-
Notifications
You must be signed in to change notification settings - Fork 28
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] Allow special chars when specifying flag_name in API #650
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. @@ Coverage Diff @@
## main #650 +/- ##
=======================================
Coverage 91.53% 91.53%
=======================================
Files 621 621
Lines 16568 16568
=======================================
Hits 15166 15166
Misses 1402 1402
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 Codecov offers a browser extension for seamless coverage viewing on GitHub. Try it in Chrome or Firefox today! |
Codecov ReportAll modified and coverable lines are covered by tests ✅ ✅ All tests successful. No failed tests found. 📢 Thoughts on this report? Let us know! |
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found @@ Coverage Diff @@
## main #650 +/- ##
=======================================
Coverage 91.53% 91.53%
=======================================
Files 621 621
Lines 16568 16568
=======================================
Hits 15166 15166
Misses 1402 1402
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## main #650 +/- ##
===========================================
Coverage 95.93000 95.93000
===========================================
Files 799 799
Lines 17885 17885
===========================================
Hits 17158 17158
Misses 727 727
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@ai-review-prompt-prod Don't mind me. Just seeing if this works. |
@@ -67,7 +67,7 @@ | |||
service_prefix = "<str:service>/" | |||
owner_prefix = "<str:service>/<str:owner_username>/" | |||
repo_prefix = "<str:service>/<str:owner_username>/repos/<str:repo_name>/" | |||
flag_prefix = repo_prefix + "flags/<str:flag_name>/" | |||
flag_prefix = repo_prefix + "flags/<path:flag_name>/" |
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.
Changing the flag_name parameter from to allows for slashes in the flag_name, which might be necessary for certain use cases. However, this change could potentially introduce security vulnerabilities if the flag_name is not properly sanitized. Ensure that the flag_name is validated and sanitized to prevent directory traversal attacks or other security issues.
This PR closes https://github.com/codecov/internal-issues/issues/526
Using the path URL pattern allows us to parse trailing chars and special characters
Some extra info here: https://stackoverflow.com/questions/68251393/how-one-can-capture-string-that-contain-one-or-more-forward-slash-in-django-urls
Before
After
Legal Boilerplate
Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. In 2022 this entity acquired Codecov and as result Sentry is going to need some rights from me in order to utilize my contributions in this PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.