mirror of
https://github.com/donaldzou/WGDashboard.git
synced 2026-04-20 03:36:17 +00:00
v4.3.1 bug fix (#1149)
* Fix bugs * Fixes and improvements * Update comment * Reduce comment
This commit is contained in:
@@ -54,6 +54,9 @@ def CheckAddress(ips_str: str) -> bool:
|
||||
return False
|
||||
return True
|
||||
|
||||
def CheckPeerKey(peer_key: str) -> bool:
|
||||
return re.match(r"^[A-Za-z0-9+/]{43}=$", peer_key)
|
||||
|
||||
def ValidateDNSAddress(addresses_str: str) -> tuple[bool, str | None]:
|
||||
if len(addresses_str) == 0:
|
||||
return False, "Got an empty list/string to check for valid DNS-addresses"
|
||||
@@ -110,4 +113,4 @@ def ValidatePasswordStrength(password: str) -> tuple[bool, str] | tuple[bool, No
|
||||
if not re.search(r'[$&+,:;=?@#|\'<>.\-^*()%!~_-]', password):
|
||||
return False, "Password must contain at least 1 special character from $&+,:;=?@#|'<>.-^*()%!~_-"
|
||||
|
||||
return True, None
|
||||
return True, None
|
||||
|
||||
Reference in New Issue
Block a user