Skip to content

Commit

Permalink
Merge pull request #41 from mtlynch/check-sess-err
Browse files Browse the repository at this point in the history
Check for error on creating a session
  • Loading branch information
0x2E authored Dec 28, 2024
2 parents c472619 + b797c5d commit dca5150
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion api/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ func (s Session) Create(c echo.Context) error {
return echo.NewHTTPError(http.StatusUnauthorized, "Wrong password")
}

sess, _ := session.Get(sessionKeyName, c)
sess, err := session.Get(sessionKeyName, c)
if err != nil {
return err
}

if !conf.Conf.SecureCookie {
sess.Options.Secure = false
Expand Down

0 comments on commit dca5150

Please sign in to comment.