Skip to content
This repository was archived by the owner on Apr 20, 2024. It is now read-only.

Commit 2a15814

Browse files
Merge pull request #62 from nodes-vapor/hotfix/reset-failure-redirects
fixes incorrect redirect from failed password resets
2 parents 1414999 + 6b9446f commit 2a15814

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/AdminPanel/Controllers/LoginController.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,11 +112,11 @@ public final class LoginController {
112112
}
113113

114114
if(password != passwordRepeat) {
115-
return Response(redirect: "admin/login/reset" + tokenStr).flash(.error, "Passwords did not match")
115+
return Response(redirect: "/admin/login/reset/" + tokenStr).flash(.error, "Passwords did not match")
116116
}
117117

118118
if !password.passes(Count.min(8)) {
119-
return Response(redirect: "admin/login/reset" + tokenStr).flash(.error, "Passwords did not match requirement")
119+
return Response(redirect: "/admin/login/reset/" + tokenStr).flash(.error, "Passwords did not match requirement")
120120
}
121121

122122
guard var backendUser = try BackendUser.query().filter("email", email).first() else {

0 commit comments

Comments
 (0)