mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-03 15:29:17 +02:00
Fix #339: Subsonic API login is now case insensitive
This commit is contained in:
parent
002f3a9507
commit
281bef48bf
3 changed files with 14 additions and 1 deletions
|
@ -19,7 +19,7 @@ def authenticate(username, password):
|
|||
password = password.replace("enc:", "", 1)
|
||||
password = binascii.unhexlify(password).decode("utf-8")
|
||||
user = User.objects.get(
|
||||
username=username, is_active=True, subsonic_api_token=password
|
||||
username__iexact=username, is_active=True, subsonic_api_token=password
|
||||
)
|
||||
except (User.DoesNotExist, binascii.Error):
|
||||
raise exceptions.AuthenticationFailed("Wrong username or password.")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue