authres.core.SyntaxError: Syntax error: Expected method

Bug #1891417 reported by niftylettuce
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
dkimpy
Expired
Undecided
Unassigned

Bug Description

Using `arcsign.py` in this package, I noticed that the following exception occurs:

```sh
ARC signature error message: Traceback (most recent call last):
 File "/var/www/production/source/node_modules/dkimpy/scripts/arcsign.py", line 79, in <module>
   main()
 File "/var/www/production/source/node_modules/dkimpy/scripts/arcsign.py", line 70, in main
   srv_id, cv, linesep=dkim.util.get_linesep(message))
 File "/home/deploy/.local/lib/python3.6/site-packages/dkim/__init__.py", line 1399, in arc_sign
   timestamp=timestamp, standardize=standardize)
 File "/home/deploy/.local/lib/python3.6/site-packages/dkim/__init__.py", line 1025, in sign
   for res in ar_headers]
 File "/home/deploy/.local/lib/python3.6/site-packages/dkim/__init__.py", line 1025, in <listcomp>
   for res in ar_headers]
 File "/home/deploy/.local/lib/python3.6/site-packages/authres/__init__.py", line 206, in parse
   return authres.core.AuthenticationResultsHeader.parse(core_features(), string)
 File "/home/deploy/.local/lib/python3.6/site-packages/authres/core.py", line 442, in parse
   return self.parse_value(feature_context, string)
 File "/home/deploy/.local/lib/python3.6/site-packages/authres/core.py", line 454, in parse_value
   header._parse()
 File "/home/deploy/.local/lib/python3.6/site-packages/authres/core.py", line 517, in _parse
   result = self._parse_resinfo()
 File "/home/deploy/.local/lib/python3.6/site-packages/authres/core.py", line 550, in _parse_resinfo
   method, version, result = self._parse_methodspec()
 File "/home/deploy/.local/lib/python3.6/site-packages/authres/core.py", line 570, in _parse_methodspec
   method, version = self._parse_method()
 File "/home/deploy/.local/lib/python3.6/site-packages/authres/core.py", line 583, in _parse_method
   raise SyntaxError('Expected method', self._parse_text)
```

Revision history for this message
niftylettuce (niftylettuce) wrote :

Maybe this should be filed on authres instead? Regardless, this affects this package too.

Revision history for this message
Scott Kitterman (kitterman) wrote :

Please provide the input used to cause this error so I can reproduce it.

Changed in dkimpy:
status: New → Incomplete
Revision history for this message
niftylettuce (niftylettuce) wrote :

Here you go Scott, see attached file.

Revision history for this message
niftylettuce (niftylettuce) wrote :

I also noticed another issue where certain attachments sent caused `arcsign.py`'s `sys.stdout.write(message)` to be writing back the wrong message it was passed (e.g. the encoding was off, or something). But that's separate but I at least wanted to share, if I can manage to find time I will file that issue with reproducible attachment.

Revision history for this message
Scott Kitterman (kitterman) wrote :

And how did you call arcsign?

Revision history for this message
niftylettuce (niftylettuce) wrote :

The normal way, `cat message | args`

Revision history for this message
niftylettuce (niftylettuce) wrote :

I have a reproducible failing test case added to my repository via this commit as well: https://github.com/forwardemail/dkimpy/commit/4e541a80b8ea81d8d239bef8d5812cd6b154f3d9

Revision history for this message
niftylettuce (niftylettuce) wrote :

@kitterman - did you need anything else from me? I've been able to reproduce this 100% of the time from my local tests as mentioned with the message I attached in #3 <https://bugs.launchpad.net/dkimpy/+bug/1891417/comments/3>.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for dkimpy because there has been no activity for 60 days.]

Changed in dkimpy:
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.