Spaces:
Runtime error
Runtime error
Update utils.py
Browse files
utils.py
CHANGED
@@ -328,13 +328,14 @@ def change_proxy(proxy):
|
|
328 |
def hide_middle_chars(s):
|
329 |
if s is None:
|
330 |
return ""
|
331 |
-
if len(s) <= 8:
|
332 |
-
return s
|
333 |
else:
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
|
|
|
|
|
|
338 |
|
339 |
|
340 |
def submit_key(key):
|
|
|
328 |
def hide_middle_chars(s):
|
329 |
if s is None:
|
330 |
return ""
|
|
|
|
|
331 |
else:
|
332 |
+
if len(s) <= 8:
|
333 |
+
return s
|
334 |
+
else:
|
335 |
+
head = s[:4]
|
336 |
+
tail = s[-4:]
|
337 |
+
hidden = "*" * (len(s) - 8)
|
338 |
+
return head + hidden + tail
|
339 |
|
340 |
|
341 |
def submit_key(key):
|