1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2026-03-07 16:17:23 +01:00

Fixed RUF039 (unraw-re-pattern)

This commit is contained in:
Teal Dulcet
2025-06-18 04:27:31 -07:00
parent e73771be5f
commit eae0db9df1
5 changed files with 8 additions and 8 deletions

View File

@@ -391,7 +391,7 @@ def scan_postgrey_line(date, log, collector):
""" Scan a postgrey log line and extract interesting data """
m = re.match(r"action=(greylist|pass), reason=(.*?), (?:delay=\d+, )?client_name=(.*), "
"client_address=(.*), sender=(.*), recipient=(.*)",
r"client_address=(.*), sender=(.*), recipient=(.*)",
log)
if m:
@@ -423,7 +423,7 @@ def scan_postfix_smtpd_line(date, log, collector):
# Check if the incoming mail was rejected
m = re.match("NOQUEUE: reject: RCPT from .*?: (.*?); from=<(.*?)> to=<(.*?)>", log)
m = re.match(r"NOQUEUE: reject: RCPT from .*?: (.*?); from=<(.*?)> to=<(.*?)>", log)
if m:
message, sender, user = m.groups()
@@ -467,7 +467,7 @@ def scan_postfix_smtpd_line(date, log, collector):
def scan_dovecot_login_line(date, log, collector, protocol_name):
""" Scan a dovecot login log line and extract interesting data """
m = re.match("Info: Login: user=<(.*?)>, method=PLAIN, rip=(.*?),", log)
m = re.match(r"Info: Login: user=<(.*?)>, method=PLAIN, rip=(.*?),", log)
if m:
# TODO: CHECK DIT

View File

@@ -167,7 +167,7 @@ def make_domain_config(domain, templates, ssl_certificates, env):
proxy_redirect_off = False
frame_options_header_sameorigin = False
web_sockets = False
m = re.search("#(.*)$", url)
m = re.search(r"#(.*)$", url)
if m:
for flag in m.group(1).split(","):
if flag == "pass-http-host":
@@ -178,7 +178,7 @@ def make_domain_config(domain, templates, ssl_certificates, env):
frame_options_header_sameorigin = True
elif flag == "web-sockets":
web_sockets = True
url = re.sub("#(.*)$", "", url)
url = re.sub(r"#(.*)$", "", url)
nginx_conf_extra += "\tlocation {} {{".format(path)
nginx_conf_extra += "\n\t\tproxy_pass {};".format(url)