GluuFederation / GluuFederation/oxAuth
fix: cors filter should not store in local variable allowed origins
- Dominant language
- Java
- Stars
- 425
- Forks
- 145
- PR merge metrics
- No merged PRs in 30d
Description
CorsFilter in doFilter [method]((https://github.com/GluuFederation/oxAuth/blob/master/Server/src/main/java/org/gluu/oxauth/filter/CorsFilter.java#L115)) get allowed origins based on request and set them in `AbstractCorsFilter.allowedOrigins` before calling `AbstractCorsFilter.doFilter`. This is bad idea to pass them in such way because WebFilter is defined with `asyncSupported = true`. Hence second request can override this variable value. We can use:
```
request.setAttribute("clientAllowedOrigins", clientAllowedOrigins);
```
to pass client allowed origins to `AbstractCorsFilter.doFilter`
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.