git.sophuwu.com > goauth
touches
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 }