Open venkat1924 opened 4 months ago
Thank you for submitting your pull request! ๐๐ We'll review it as soon as possible. In the meantime, please ensure that your changes align with our CONTRIBUTING.md. If there are any specific instructions or feedback regarding your PR, we'll provide them here. Thanks again for your contribution! ๐
This PR addresses #57
Changes Made
Dependencies Added:
marshmallow
for input validation.bleach
for input sanitization.requirements.in
and generatedrequirements.txt
.Validation and Sanitization Implementation:
RankRequestSchema
,KeywordExtractorSchema
, andAIRequestSchema
schemas usingmarshmallow
to define the structure and validation rules for the input data.bleach
to sanitize the input data to prevent XSS attacks.Endpoint Updates:
/rank
Endpoint:400
error if validation fails./keyword_extractor
Endpoint:400
error if validation fails./ai
Endpoint:400
error if validation fails.Standalone Validation and Sanitization Script:
test_sanitization.py
to simulate and test input validation and sanitization without needing the MongoDB connection. Currently, it is in theUtils
directory.