summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Gabaldon <igabaldon@inetol.net>2026-07-30 14:36:55 +0200
committerBnyro <bnyro@tutanota.com>2026-07-30 14:54:39 +0200
commitf25b75e613755e34bbe470fb089e8d28b0be9fb3 (patch)
tree77fce95a332e5566e51c1b5cc32da54d21e6deeb
parent98e10f9ab4800c8065220b20eae30b73e62cb470 (diff)
[mod] py: cleanup link_token.py
-rw-r--r--searx/botdetection/link_token.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/searx/botdetection/link_token.py b/searx/botdetection/link_token.py
index a74b2eaa4..ff67d6fb1 100644
--- a/searx/botdetection/link_token.py
+++ b/searx/botdetection/link_token.py
@@ -151,6 +151,6 @@ def get_token() -> str:
if token:
token = token.decode('UTF-8') # type: ignore
else:
- token = ''.join(random.choice(string.ascii_lowercase + string.digits) for _ in range(16))
+ token = ''.join(random.choices(string.ascii_lowercase + string.digits, k=16))
valkey_client.set(TOKEN_KEY, token, ex=TOKEN_LIVE_TIME)
return token