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 500 error when attempting to update installed repository. #1082
Conversation
@@ -335,6 +335,17 @@ def shrink_string_by_size( value, size, join_by="..", left_larger=True, beginnin | |||
return value | |||
|
|||
|
|||
def parse_query_string( query_string ): |
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.
Should this function be able to deal with malicious query_string
s ? E.g.: 'foo=3&bar=4&'
, 'foo&pluto=4'
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 don't think it will be necessary, but there's absolutely no harm in preventing malice.
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.
Brilliant, thanks! I think that now that you've added if '=' not in argument
, you can remove:
if '=' not in query_string:
return {}
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.
@carlfeberhard reminded me that urlparse.parse_qs exists.
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.
Good idea!
is there an example of repo that has this problem? @bgruening @davebx |
@martenson I've been able to reliably cause the error locally, but not when installing or updating from TTS. |
This PR solves the issue for me, thanks @davebx ! |
Fix 500 error when attempting to update installed repository.
@davebx @martenson this is a bugfix can we get it into 15.10? |
@bgruening I am working on that already, stay tuned! :) |
Thanks! |
No description provided.