mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-12 09:23:09 -06:00
Fix the wrong regex for endpoint
This commit is contained in:
parent
b2bb813020
commit
55552050c6
|
|
@ -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}
|
// AuthFallback implements GET on /auth/{authType}/fallback/web?session={sessionID}
|
||||||
func AuthFallback(
|
func AuthFallback(
|
||||||
w http.ResponseWriter, req *http.Request, authType string, sessionID string,
|
w http.ResponseWriter, req *http.Request, authType string,
|
||||||
cfg config.Dendrite,
|
cfg config.Dendrite,
|
||||||
) *util.JSONResponse {
|
) *util.JSONResponse {
|
||||||
|
sessionID := req.Form.Get("session")
|
||||||
ServeRecaptcha := func() {
|
ServeRecaptcha := func() {
|
||||||
data := map[string]string{
|
data := map[string]string{
|
||||||
"MyUrl": req.URL.String(),
|
"MyUrl": req.URL.String(),
|
||||||
|
|
|
||||||
|
|
@ -174,10 +174,10 @@ func Setup(
|
||||||
}),
|
}),
|
||||||
).Methods("GET", "POST", "OPTIONS")
|
).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 {
|
common.MakeHTMLAPI("authfallback", func(w http.ResponseWriter, req *http.Request) *util.JSONResponse {
|
||||||
vars := mux.Vars(req)
|
vars := mux.Vars(req)
|
||||||
return AuthFallback(w, req, vars["authType"], vars["sessionID"], cfg)
|
return AuthFallback(w, req, vars["authType"], cfg)
|
||||||
}),
|
}),
|
||||||
).Methods("GET", "POST", "OPTIONS")
|
).Methods("GET", "POST", "OPTIONS")
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue