-
Notifications
You must be signed in to change notification settings - Fork 213
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 a warning when source query parameter contains invalid values #3949
Add a warning when source query parameter contains invalid values #3949
Conversation
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.
The code as is will not work.
Can you add testing instructions to the PR description, @manojks1999? A small unit test could also help verify that the code works as intended, and would have caught the existing bug.
sources = [source for source in sources if source in allowed_sources] | ||
original_len = len(sources) | ||
valid_sources = [source for source in sources if source in allowed_sources] | ||
if original_len > len(sources): |
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.
if original_len > len(sources): | |
if original_len > len(valid_sources): |
Hi @manojks1999 I will draft this PR for you until you've had a chance to address feedback from reviewers. Thank you for the PR! |
6e8a96a
to
a9660fe
Compare
Signed-off-by: Olga Bulat <[email protected]>
Signed-off-by: Olga Bulat <[email protected]>
a9660fe
to
718e75d
Compare
@manojks1999, thank you for your work on this PR! |
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.
LGTM, thanks for updating the PR, Olga, and thanks for starting it, @manojks1999.
Fixes
Fixes #3945 by @obulat
Description
Added warning for invalid sources from input.
Testing instructions
Checklist
Update index.md
).main
) or a parent feature branch.Developer Certificate of Origin
Developer Certificate of Origin