diff --git a/src/github.com/matrix-org/dendrite/clientapi/routing/auth_fallback.go b/src/github.com/matrix-org/dendrite/clientapi/routing/auth_fallback.go index 386b6ceab..f786e2b15 100644 --- a/src/github.com/matrix-org/dendrite/clientapi/routing/auth_fallback.go +++ b/src/github.com/matrix-org/dendrite/clientapi/routing/auth_fallback.go @@ -101,9 +101,10 @@ func ServeTemplate(w http.ResponseWriter, templateHTML string, data map[string]s // AuthFallback implements GET on /auth/{authType}/fallback/web?session={sessionID} func AuthFallback( - w http.ResponseWriter, req *http.Request, authType string, sessionID string, + w http.ResponseWriter, req *http.Request, authType string, cfg config.Dendrite, ) *util.JSONResponse { + sessionID := req.Form.Get("session") ServeRecaptcha := func() { data := map[string]string{ "MyUrl": req.URL.String(), diff --git a/src/github.com/matrix-org/dendrite/clientapi/routing/routing.go b/src/github.com/matrix-org/dendrite/clientapi/routing/routing.go index 0b4eb37ef..6c5f4bd2f 100644 --- a/src/github.com/matrix-org/dendrite/clientapi/routing/routing.go +++ b/src/github.com/matrix-org/dendrite/clientapi/routing/routing.go @@ -174,10 +174,10 @@ func Setup( }), ).Methods("GET", "POST", "OPTIONS") - r0mux.Handle("/auth/{authType}/fallback/web?session={sessionID}", + r0mux.Handle("/auth/{authType}/fallback/web", common.MakeHTMLAPI("authfallback", func(w http.ResponseWriter, req *http.Request) *util.JSONResponse { vars := mux.Vars(req) - return AuthFallback(w, req, vars["authType"], vars["sessionID"], cfg) + return AuthFallback(w, req, vars["authType"], cfg) }), ).Methods("GET", "POST", "OPTIONS")