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

Commit 7141621

Browse files
committed
made reset password code accessible server-side only via a root token
1 parent 238b11f commit 7141621

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ func Start(dbHost, port string) {
124124
http.Handle("/login", middleware.Chain(http.HandlerFunc(m.login), pubWithDB...))
125125
http.Handle("/register", middleware.Chain(http.HandlerFunc(m.register), pubWithDB...))
126126
http.Handle("/email", middleware.Chain(http.HandlerFunc(m.emailExists), pubWithDB...))
127-
http.Handle("/password/resetcode", middleware.Chain(http.HandlerFunc(m.setResetCode), pubWithDB...))
127+
http.Handle("/password/resetcode", middleware.Chain(http.HandlerFunc(m.setResetCode), stdRoot...))
128128
http.Handle("/password/reset", middleware.Chain(http.HandlerFunc(m.resetPassword), pubWithDB...))
129129
//http.Handle("/setrole", chain(http.HandlerFunc(setRole), withDB))
130130

0 commit comments

Comments
 (0)