Fixed login scope check
This commit is contained in:
pare
68899a0cc4
commit
ead7b7fc5e
S'han modificat 1 arxius amb 2 adicions i 2 eliminacions
|
@ -101,8 +101,8 @@ class Mastodon:
|
||||||
except:
|
except:
|
||||||
raise ValueError('Invalid user name, password or scopes.')
|
raise ValueError('Invalid user name, password or scopes.')
|
||||||
|
|
||||||
requested_scopes = " ".join(scopes)
|
requested_scopes = " ".join(sorted(scopes))
|
||||||
received_scopes = " ".join(sorted(response["scopes"].split(" ")))
|
received_scopes = " ".join(sorted(response["scope"].split(" ")))
|
||||||
|
|
||||||
if requested_scopes != received_scopes:
|
if requested_scopes != received_scopes:
|
||||||
raise ValueError('Granted scopes "' + received_scopes + '" differ from requested scopes "' + requested_scopes + '".')
|
raise ValueError('Granted scopes "' + received_scopes + '" differ from requested scopes "' + requested_scopes + '".')
|
||||||
|
|
Loading…
Referencia en una nova incidència