Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Sanitization Filter for Request Params, Request Body, and Headers #87

Closed
5 tasks done
kreloaded opened this issue Aug 31, 2023 · 0 comments · Fixed by #78
Closed
5 tasks done

Add Sanitization Filter for Request Params, Request Body, and Headers #87

kreloaded opened this issue Aug 31, 2023 · 0 comments · Fixed by #78
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@kreloaded
Copy link
Contributor

kreloaded commented Aug 31, 2023

In an effort to enhance the security of our Spring Boot application, there's a need to add a Sanitization Filter that would sanitize all incoming request parameters, request bodies, and headers to prevent security vulnerabilities such as SQL Injection, Cross-Site Scripting (XSS), etc.

Details

  • Sanitize Request Parameters: All incoming request parameters should be sanitized to strip or escape dangerous characters or strings that could be used for SQL Injection, XSS attacks, etc.
  • Sanitize Request Body: For POST, PUT, and PATCH requests, the request body often contains user-inputted data that should also be sanitized.
  • Sanitize Headers: HTTP headers like User-Agent, Referer, etc., can also contain malicious strings and should be sanitized.

Expected Behavior
Once the Sanitization Filter is implemented, any incoming request should automatically be sanitized before hitting the application controllers.

Technical Requirements

  • The filter should be part of a new or existing Spring Boot starter project.
  • Must use existing Spring Boot's Filter interface.
  • Should work seamlessly with existing security configurations.
  • Must include unit tests to verify the functionality.

Acceptance Criteria

  • Successfully sanitize all incoming request parameters.
  • Successfully sanitize request bodies for POST, PUT, and PATCH requests.
  • Successfully sanitize all incoming HTTP headers.
  • No noticeable performance degradation.
  • Unit tests confirming the sanitization.

Optional

Documentation on how to use and configure the Sanitization Filter.

@kreloaded kreloaded added the enhancement New feature or request label Aug 31, 2023
@kreloaded kreloaded added this to the v0.2.0 milestone Aug 31, 2023
@kreloaded kreloaded self-assigned this Aug 31, 2023
@kreloaded kreloaded linked a pull request Aug 31, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant