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.
Fix object deserialization vulnerability and set 'HttpOnly' and 'secure' flag for cookies
Fixed object deserialization vulnerability by checking if the deserialized object is of the expected type. Set the 'HttpOnly' flag for cookies by calling 'cookie.setHttpOnly(true);' and set the 'secure' flag by calling 'new Cookie("auth", cookieValue ).setSecure(true);'.Add RequestMethod.POST to RequestMapping in AppErrorController
Added RequestMethod.POST to the RequestMapping annotation in the error method to specify the HTTP method.Fix Spring expression injection vulnerability
Added a validation to ensure the input value is properly validated before being evaluated by the Spring expression parser.Fix hardcoding of AWS Access Key ID
Removed hardcoded AWS Access Key ID value and updated to retrieve it from environment variables or external files for better security.