aboutsummaryrefslogtreecommitdiff
path: root/routes
diff options
context:
space:
mode:
Diffstat (limited to 'routes')
-rw-r--r--routes/user/auth.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/routes/user/auth.go b/routes/user/auth.go
index 16e8bd2d..76e51c36 100644
--- a/routes/user/auth.go
+++ b/routes/user/auth.go
@@ -73,10 +73,10 @@ func AutoLogin(c *context.Context) (bool, error) {
}
// isValidRedirect returns false if the URL does not redirect to same site.
-// False: //url, http://url
+// False: //url, http://url, /\url
// True: /url
func isValidRedirect(url string) bool {
- return len(url) >= 2 && url[0] == '/' && url[1] != '/'
+ return len(url) >= 2 && url[0] == '/' && url[1] != '/' && url[1] != '\\'
}
func Login(c *context.Context) {