mirror of
https://github.com/Stirling-Tools/Stirling-PDF.git
synced 2025-08-26 14:19:24 +00:00
Introduced protections against HTTP header injection / smuggling attacks
This commit is contained in:
parent
977f91b0bc
commit
7782407394
@ -1,5 +1,6 @@
|
||||
package stirling.software.proprietary.security.service;
|
||||
|
||||
import io.github.pixee.security.Newlines;
|
||||
import java.security.KeyPair;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
@ -150,7 +151,7 @@ public class JWTService implements JWTServiceInterface {
|
||||
|
||||
@Override
|
||||
public void addTokenToResponse(HttpServletResponse response, String token) {
|
||||
response.setHeader(AUTHORIZATION_HEADER, BEARER_PREFIX + token);
|
||||
response.setHeader(AUTHORIZATION_HEADER, Newlines.stripAll(BEARER_PREFIX + token));
|
||||
|
||||
ResponseCookie cookie =
|
||||
ResponseCookie.from(JWT_COOKIE_NAME, token)
|
||||
|
Loading…
x
Reference in New Issue
Block a user