Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request from patched fixes 4 issues.
Secure cookie by setting HttpOnly and Secure flags and remove unsafe object deserialization
The diff update ensures that the 'HttpOnly' and 'secure' flags are set on cookies to increase security and avoid potential Cross-Site Scripting (XSS) attacks. Furthermore, the Object deserialization has been replaced by field deserialization of the AuthToken object.Fix potential CSRF vulnerability by specifying request method
Add 'method' parameter in '@RequestMapping' annotations and specify it as 'RequestMethod.GET' since the methods do not seem to alter state. Additionally, HTTP methods were not explicitly mentioned earlier, making the functions susceptible to CSRF attacks. By specifying the HTTP methods, CSRF protections should now be in place.Fixed potential Spring Expression Language (SpEL) injection vulnerability.
Added user input sanitization to prevent Spring Expression Language (SpEL) injection. The user provided input is now checked before using it for expression parsing, disallowing special characters or malicious code fragments that can lead to SpEL injection.Removed hardcoded AWS credentials
AWS Access Key ID and Secret Access Key were hardcoded, which posed a security risk. These credentials have been removed from the properties file. These credentials should now be provided via environment variables in a secure manner.