forgejo/services/auth
Paweł Bogusławski d5856fece7
SessionUser protection against nil pointer dereference ()
Backport  

`SessionUser` should be protected against passing `sess` = `nil` to
avoid

```
PANIC: runtime error: invalid memory address or nil pointer dereference
```

in


https://github.com/go-gitea/gitea/pull/18452/files#diff-a215b82aadeb8b4c4632fcf31215dd421f804eb1c0137ec6721b980136e4442aR69

after upgrade from gitea v1.16 to v1.17.

Related: https://github.com/go-gitea/gitea/pull/18452
2022-10-24 20:05:35 +01:00
..
source EscapeFilter the group dn membership () () 2022-07-06 20:51:40 +01:00
auth.go Remove dependent on session auth for api/v1 routers () 2022-04-08 06:22:10 +02:00
auth_test.go format with gofumpt () 2022-01-20 18:46:10 +01:00
basic.go Add Package Registry () 2022-03-30 16:42:47 +08:00
group.go Let web and API routes have different auth methods group () 2022-03-28 12:46:28 +08:00
httpsign.go Implement http signatures support for the API () 2022-06-05 08:16:14 +01:00
interface.go Move user related model into models/user () 2021-11-24 17:49:20 +08:00
oauth2.go Move almost all functions' parameter db.Engine to context.Context () 2022-05-20 22:08:52 +08:00
reverseproxy.go Move almost all functions' parameter db.Engine to context.Context () 2022-05-20 22:08:52 +08:00
session.go SessionUser protection against nil pointer dereference () 2022-10-24 20:05:35 +01:00
signin.go Restore user autoregistration with email addresses () 2022-03-31 15:20:25 +02:00
source.go Refactor auth package () 2022-01-02 21:12:35 +08:00
sspi_windows.go Move almost all functions' parameter db.Engine to context.Context () 2022-05-20 22:08:52 +08:00
sync.go Refactor auth package () 2022-01-02 21:12:35 +08:00