diff --git a/warden3/warden_server/warden_server.py b/warden3/warden_server/warden_server.py
index 96eca7fd383c9f586248c72e01cb7c98cf7d1839..dd9d787da3d8d0d2b7170ede1c6f4900b2ae4a6a 100644
--- a/warden3/warden_server/warden_server.py
+++ b/warden3/warden_server/warden_server.py
@@ -1505,7 +1505,7 @@ def modify_client(**kwargs):
return False
if hostname.endswith("."): # A single trailing dot is legal
hostname = hostname[:-1] # strip exactly one dot from the right, if present
- disallowed = re.compile("[^A-Z\d-]", re.IGNORECASE)
+ disallowed = re.compile(r"[^A-Z\d-]", re.IGNORECASE)
return all( # Split by labels and verify individually
(label and len(label) <= 63 # length is within proper range
and not label.startswith("-") and not label.endswith("-") # no bordering hyphens
@@ -1513,12 +1513,12 @@ def modify_client(**kwargs):
for label in hostname.split("."))
def isValidNSID(nsid):
- allowed = re.compile("^(?:[a-zA-Z_][a-zA-Z0-9_]*\\.)*[a-zA-Z_][a-zA-Z0-9_]*$")
+ allowed = re.compile(r"^(?:[a-zA-Z_][a-zA-Z0-9_]*\.)*[a-zA-Z_][a-zA-Z0-9_]*$")
return allowed.match(nsid)
def isValidEmail(mail):
mails = (email.utils.parseaddr(m) for m in mail.split(","))
- allowed = re.compile("^[a-zA-Z0-9_.%!+-]+@[a-zA-Z0-9-.]+$") # just basic check
+ allowed = re.compile(r"^[a-zA-Z0-9_.%!+-]+@[a-zA-Z0-9-.]+$") # just basic check
valid = (allowed.match(ms[1]) for ms in mails)
return all(valid)