mirror of
https://github.com/onionshare/onionshare.git
synced 2025-05-02 06:26:10 -04:00
Checks if username is ASCII string else throw an error
This commit is contained in:
parent
7d6d30c020
commit
4df863ce4d
2 changed files with 12 additions and 1 deletions
|
@ -51,6 +51,7 @@ class ChatModeWeb:
|
|||
username = username.strip()
|
||||
return (
|
||||
username
|
||||
and username.isascii()
|
||||
and username not in self.connected_users
|
||||
and len(username) < 128
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue