Skip to content

Commit 8ae9b8c

Browse files
authored
Fix invalid variable naming (#243)
1 parent 0897747 commit 8ae9b8c

3 files changed

Lines changed: 4 additions & 7 deletions

File tree

app/src/db.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ class ScanLogEntry(Base): # type: ignore
8585

8686
def __repr__(self) -> str:
8787
return ("<ScanLogEntry(domain='%s', source='%s', client_ip='%s', " "client_user_agent='%s')>") % (
88-
self.domain,
88+
self.from_domain,
8989
self.source,
9090
self.client_ip,
9191
self.client_user_agent,

scan/libmailgoose/scan.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ class DomainScanResult:
103103
spf: SPFScanResult
104104
dmarc: DMARCScanResult
105105
ssl: Optional[ssl_check.SSLScanResult]
106-
domain: str
107106
base_domain: str
108107
warnings: List[str]
109108
domain_does_not_exist: bool
@@ -326,8 +325,7 @@ def scan_domain(
326325
if not parked
327326
else None
328327
),
329-
domain=domain,
330-
base_domain=checkdmarc.get_base_domain(domain),
328+
base_domain=checkdmarc.get_base_domain(from_domain),
331329
domain_does_not_exist=False,
332330
warnings=warnings,
333331
)
@@ -351,7 +349,7 @@ def scan_domain(
351349
try:
352350
parsed_spf = checkdmarc.spf.parse_spf_record(
353351
domain_result.spf.record,
354-
domain_result.domain,
352+
envelope_domain,
355353
parked=parked,
356354
nameservers=nameservers,
357355
timeout=timeout,
@@ -446,7 +444,7 @@ def scan_domain(
446444
"records may cause problems with some DMARC implementations.",
447445
)
448446
dmarc_query = checkdmarc.dmarc.query_dmarc_record(
449-
domain,
447+
from_domain,
450448
nameservers=nameservers,
451449
timeout=timeout,
452450
ignore_unrelated_records=True,

test/test_api.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ def test_dmarc_starts_with_whitespace(self) -> None:
3636
"record_not_found": False,
3737
},
3838
"spf_not_required_because_of_correct_dmarc": False,
39-
"domain": "starts-with-whitespace.dmarc.test.mailgoose.cert.pl",
4039
"base_domain": "cert.pl",
4140
"warnings": [],
4241
"ssl": {

0 commit comments

Comments
 (0)