You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When parsing a zone file with DMARC records which have a trailing escaped semi-colon, the library throws an error:
Two relevant lines from our zone file: (redacted)._dmarc 3600 IN TXT v=DMARC1
(redacted)._dmarc 3600 IN TXT v=DMARC1\;
The line without "\;" parses just fine, but the line with "\;" causes: Traceback (most recent call last):
File "C:\git\webteam-site-shield\akamai\get_zones.py", line 88, in
main()
File "C:\git\webteam-site-shield\akamai\get_zones.py", line 28, in main
records = get_master_zone_file("metoffice.gov.uk")
File "C:\git\webteam-site-shield\akamai\get_zones.py", line 57, in get_master_zone_file
records = zonefile_parser.parse(content_as_string)
File "C:\git\webteam-site-shield\akamai\venv\lib\site-packages\zonefile_parser\main.py", line 188, in parse
normalized_records = list(
File "C:\Program Files\Python310\lib\shlex.py", line 315, in split
return list(lex)
File "C:\Program Files\Python310\lib\shlex.py", line 300, in next
token = self.get_token()
File "C:\Program Files\Python310\lib\shlex.py", line 109, in get_token
raw = self.read_token()
File "C:\Program Files\Python310\lib\shlex.py", line 210, in read_token
raise ValueError("No escaped character")
ValueError: No escaped character
Is the zone file not meeting the standard?
Either way, can the library support escaped semicolons without throwing an error?
If it has to throw an error, can the error thrown be more useful?
The text was updated successfully, but these errors were encountered:
When parsing a zone file with DMARC records which have a trailing escaped semi-colon, the library throws an error:
Two relevant lines from our zone file:
(redacted)._dmarc 3600 IN TXT v=DMARC1
(redacted)._dmarc 3600 IN TXT v=DMARC1\;
The line without "\;" parses just fine, but the line with "\;" causes:
Traceback (most recent call last):
File "C:\git\webteam-site-shield\akamai\get_zones.py", line 88, in
main()
File "C:\git\webteam-site-shield\akamai\get_zones.py", line 28, in main
records = get_master_zone_file("metoffice.gov.uk")
File "C:\git\webteam-site-shield\akamai\get_zones.py", line 57, in get_master_zone_file
records = zonefile_parser.parse(content_as_string)
File "C:\git\webteam-site-shield\akamai\venv\lib\site-packages\zonefile_parser\main.py", line 188, in parse
normalized_records = list(
File "C:\Program Files\Python310\lib\shlex.py", line 315, in split
return list(lex)
File "C:\Program Files\Python310\lib\shlex.py", line 300, in next
token = self.get_token()
File "C:\Program Files\Python310\lib\shlex.py", line 109, in get_token
raw = self.read_token()
File "C:\Program Files\Python310\lib\shlex.py", line 210, in read_token
raise ValueError("No escaped character")
ValueError: No escaped character
The text was updated successfully, but these errors were encountered: