git.sophuwu.com > goauth
touches
sophuwu sophie@skisiel.com
Sun, 18 May 2025 20:03:20 +0200
commit

e0e6748fb874b643fb7d5d4e44002866924a28bf

parent

ae181af2163fb34f28f0f2b40f11e101f5079e22

1 files changed, 2 insertions(+), 2 deletions(-)

jump to
M htsesh/session.gohtsesh/session.go

@@ -51,7 +51,7 @@ return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {

if sessionOK(r) { if r.URL.Query().Has("logout") { ji := base32.StdEncoding.EncodeToString(sessionID.Load().V[:5]) - if r.URL.Query().Get("id") == ji { + if r.URL.Query().Get("logoutid") == ji { sessionID.Store(nil) http.SetCookie(w, &http.Cookie{ Name: "session_id",

@@ -65,7 +65,7 @@ http.Redirect(w, r, r.URL.Path, http.StatusSeeOther)

} else { w.Header().Set("Content-Type", "text/html") w.WriteHeader(http.StatusUnauthorized) - w.Write([]byte("<html><body><a href='?logout&id=" + ji + "'>Logout</a></body></html>")) + w.Write([]byte("<html><body><a href='?logout&logoutid=" + ji + "'>Logout</a></body></html>")) } return }