Skip to content

Commit 6845523

Browse files
committed
reverse password and api auth (fall back to apikey)
1 parent 79c06c4 commit 6845523

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

src/ampache.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4054,13 +4054,13 @@ def execute(self, method: str, params=None):
40544054
params["ampache_api"] = self.AMPACHE_KEY
40554055
if not "ampache_user" in params:
40564056
params["ampache_user"] = self.AMPACHE_USER
4057-
if not "timestamp" in params or params["timestamp"] == 0:
4057+
if "timestamp" in params and not params["timestamp"] == 0:
40584058
return self.handshake(params["ampache_url"],
4059-
self.encrypt_string(params["ampache_api"], params["ampache_user"]),
4060-
False, False, params["version"])
4059+
self.encrypt_password(params["ampache_api"], int(params["timestamp"])),
4060+
params["ampache_user"], int(params["timestamp"]), params["version"])
40614061
return self.handshake(params["ampache_url"],
4062-
self.encrypt_password(params["ampache_api"], int(params["timestamp"])),
4063-
params["ampache_user"], int(params["timestamp"]), params["version"])
4062+
self.encrypt_string(params["ampache_api"], params["ampache_user"]),
4063+
False, False, params["version"])
40644064
case 'goodbye':
40654065
return self.goodbye()
40664066
case 'lost_password':

0 commit comments

Comments
 (0)