fix: use endwith() instead of endWith() - #3598
Merged
Merged
Conversation
jef
marked this pull request as draft
May 22, 2020 20:30
Member
Author
|
Working on creating some tests so we don't run into this problem again. |
Member
|
So far, so good. 😃 |
made them static private class methods
jef
marked this pull request as ready for review
May 23, 2020 01:24
jef
commented
May 23, 2020
| r = string.ascii_letters + string.digits | ||
| salt = "".join([random.choice(r) for _ in range(6)]) | ||
| salted_password = password + salt | ||
| token = hashlib.md5(salted_password.encode('utf-8')).hexdigest() |
Member
Author
There was a problem hiding this comment.
Also changed this, but hard to tell in GitHub diff...
Used to be hashlib.md5().update(salted_password.encode('utf-8')).hexdigest(). Seems like a better use of hashlib.
| """ | ||
|
|
||
| url = config['subsonic']['url'].as_str() | ||
| if url and url.endswith('/'): |
Member
|
Nice; looks prefect to me! Thanks!! |
Member
Author
|
Thanks as always! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes method call error created by this: #3449
Moved the helper static functions to the
SubsonicUpdateclass and made them private static.Added tests for various of URL input and made sure that it can create a token and format URL correctly.