don't verify empty cookies
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
b2fc689bdc
commit
dee173cc63
|
@ -169,7 +169,7 @@ func VerifySessionContinuation(context *RequestContext, req *http.Request, resp
|
|||
user, userErr := getUserFromAuthHeader(context.DBConn, authHeader)
|
||||
|
||||
sessionCookie, err := req.Cookie("session")
|
||||
if err == nil {
|
||||
if err == nil && sessionCookie.Value != "" {
|
||||
user, userErr = getUserFromSession(context.DBConn, sessionCookie.Value)
|
||||
}
|
||||
|
||||
|
@ -180,6 +180,8 @@ func VerifySessionContinuation(context *RequestContext, req *http.Request, resp
|
|||
Name: "session",
|
||||
MaxAge: 0, // reset session cookie in case
|
||||
})
|
||||
|
||||
context.User = nil
|
||||
return failure(context, req, resp)
|
||||
}
|
||||
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
{{ define "content" }}
|
||||
<p class="blinky">under construction!</p>
|
||||
<p class="blinky">under construction!</p>
|
||||
{{ end }}
|
||||
|
|
Loading…
Reference in New Issue