Improve blocking of non local urls
It was found that the original check didn't stop
http:www.google.com forwards. This fixes that issue.
Tested: Verified that the url forward didn't work
Change-Id: I44a9b84218e15ddd0d37d5fbda633b66326da1f4
Signed-off-by: James Feist <james.feist@linux.intel.com>
diff --git a/app/login/controllers/login-controller.js b/app/login/controllers/login-controller.js
index 350429b..cc0f0b3 100644
--- a/app/login/controllers/login-controller.js
+++ b/app/login/controllers/login-controller.js
@@ -42,7 +42,7 @@
var next = $location.search().next;
// don't allow forwarding to non-local urls
if (next === undefined || next == null ||
- next.indexOf('//') >= 0) {
+ next.indexOf(':') >= 0) {
$window.location.hash = '#/overview/server';
} else {
$window.location.href = next;