-
Notifications
You must be signed in to change notification settings - Fork 10
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
fix(custom_header): not correctly parsing parameters #172
Conversation
Due to ocervell's experience, I think it's better if he (or another developer) from the team reviews this. |
@sourcery-ai review |
Reviewer's Guide by SourceryThis pull request addresses a bug in custom header parsing for scans, improves the robustness of command execution, and enhances logging and error handling. The changes primarily affect the File-Level Changes
Tips
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @psyray - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟡 General issues: 1 issue found
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟡 Complexity: 1 issue found
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is the only thing I can find. Not sure how much effort I should put into testing every possibility.
- Introduced a clean_quotes function to sanitize input data by removing double quotes. - Updated form handling in add_engine and update_engine views to use the clean_quotes function for input sanitization. - Added UTF-8 encoding support to various file operations to ensure proper handling of text files. - Enhanced parse_custom_header function to validate header values and raise errors for invalid formats.
Fixes #19
When you set custom header in the scan, value does not been parsed correctly, making httpx crash and not resolving http request.
As httpx is the base of the scan, no other scan will be launched because no URL was found.
I've reworked the run_command and stream_command to be more rock solid.
I've also removed duplicated code
Should fix other problems when parameters contains spaces in their value.
Now custom headers is fully effective and working fine
Summary by Sourcery
Fix the issue with custom header parsing that caused httpx crashes, refactor command execution functions for improved stability, and enhance logging for better debugging.
Bug Fixes:
Enhancements: