mirror of
https://github.com/oauth2-proxy/oauth2-proxy.git
synced 2025-01-24 05:26:55 +02:00
fix(1356): test if session variable is null (#1357)
* fix(1356): test if session variable is null * fix(1356): adding changelog Co-authored-by: Hedi Harzallah <hharzalla@talend.com>
This commit is contained in:
parent
54d44ccb8f
commit
ccbb98acd9
@ -34,6 +34,7 @@
|
||||
- [#1244](https://github.com/oauth2-proxy/oauth2-proxy/pull/1244) Update Alpine image version to 3.14 (@ahovgaard)
|
||||
- [#1317](https://github.com/oauth2-proxy/oauth2-proxy/pull/1317) Fix incorrect `</form>` tag on the sing_in page when *not* using a custom template (@jord1e)
|
||||
- [#1330](https://github.com/oauth2-proxy/oauth2-proxy/pull/1330) Allow specifying URL as input for custom sign in logo (@MaikuMori)
|
||||
- [#1357](https://github.com/oauth2-proxy/oauth2-proxy/pull/1357) Fix unsafe access to session variable (@harzallah)
|
||||
|
||||
# V7.1.3
|
||||
|
||||
|
@ -31,7 +31,9 @@ func loadBasicAuthSession(validator basic.Validator, sessionGroups []string, pre
|
||||
if preferEmail {
|
||||
getSession = func(validator basic.Validator, sessionGroups []string, req *http.Request) (*sessionsapi.SessionState, error) {
|
||||
session, err := getBasicSession(validator, sessionGroups, req)
|
||||
session.Email = session.User
|
||||
if session != nil {
|
||||
session.Email = session.User
|
||||
}
|
||||
return session, err
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user