1
0
mirror of https://github.com/krateng/maloja.git synced 2023-08-10 21:12:55 +03:00

Extracting host from request

This commit is contained in:
krateng
2020-10-02 04:35:36 +02:00
committed by GitHub
parent a4722f9e55
commit 38d4716dc5

View File

@@ -34,6 +34,7 @@ class Audioscrobbler(APIHandler):
auth = keys.get("a")
timestamp = keys.get("t")
apikey = keys.get("api_key")
host = keys.get("Host")
# expect username and password
if user is not None and apikey is None:
receivedToken = lastfmToken(password, timestamp)
@@ -107,4 +108,4 @@ def lastfmToken(password, ts):
def checkPassword(receivedToken, expectedKey, ts):
expectedToken = lastfmToken(expectedKey, ts)
return receivedToken == expectedToken
return receivedToken == expectedToken