A collection of sanitizer implementations across multiple programming languages, designed to prevent injection attacks by cleaning and decoding user input. 🚫
- HTML Decoding: Automatically decodes HTML entities (e.g.,
<
→<
). - Disallowed Character Removal: Removes dangerous characters 🛑.
- Space Trimming: Removes spaces from the start and end of input ✂️.
- Multi-Language Support: Includes sanitizer implementations in multiple languages (e.g., Go, C#) 🌍.
The repository contains sanitizers implemented in the following languages:
- Go: Available in
golang/
- C#: Available in
csharp/
- Py: Available in
python/
- (More languages coming soon!)
Each language folder contains its own implementation. To use a sanitizer in your project, simply copy the implementation into your codebase and call the Sanitize
function with the input you want to sanitize.
Original: %27; DROP TABLE users;
Sanitized: DROP TABLE users
- Fork the repository.
- Create your feature branch (
git checkout -b feature/your-feature
). - Commit your changes (
git commit -m 'Add some feature'
). - Push to the branch (
git push origin feature/your-feature
). - Open a pull request to merge your changes.