mirror of https://github.com/CIRCL/lookyloo
add: function that checks if username is valid
parent
10f0adb7a5
commit
db0a11185a
|
@ -49,6 +49,8 @@ def load_user_from_request(request: Request) -> User | None:
|
|||
return user
|
||||
return None
|
||||
|
||||
def valid_username(username: str) -> bool:
|
||||
return re.match("^[A-Za-z0-9]+$", username)
|
||||
|
||||
@lru_cache(64)
|
||||
def build_keys_table() -> dict[str, str]:
|
||||
|
|
Loading…
Reference in New Issue