Skip to content

Commit 421af3b

Browse files
Manu ChaudharyManu Chaudhary
authored andcommitted
Wrong auth param fix
1 parent bbe1624 commit 421af3b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

imagekitio/utils/calculation.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def hamming_distance(first: str, second: str) -> int:
2222

2323
def get_authenticated_params(token, expire, private_key):
2424
default_expire = int(dt.now().strftime("%s")) + DEFAULT_TIME_DIFF
25-
token = token or str(uuid.uuid4()
25+
token = token or str(uuid.uuid4())
2626
auth_params = {"token": token, "expire": expire, "signature": ""}
2727

2828
if not private_key:
@@ -33,7 +33,7 @@ def get_authenticated_params(token, expire, private_key):
3333
digestmod=hashlib.sha1,
3434
).hexdigest()
3535

36-
auth_params["token"] = token
36+
auth_params["token"] = token or str(uuid.uuid4())
3737
auth_params["expire"] = expire or default_expire
3838
auth_params["signature"] = signature
3939

0 commit comments

Comments
 (0)