Skip to content

Ignore HttpOnly attribute in cookie file

Christopher Wipf requested to merge christopher.wipf/dcc:cookie-fix into master

I get the following when using the dcc CLI from master on Debian buster:

$ python3 -m dcc view -v E1200123
Found cookie file: /tmp/ecpcookie.u1000
Fetching contents at URL
Authentication failure, retrieving new cookie...
Fetching cookies for:
Found cookie file: /tmp/ecpcookie.u1000
Fetching contents at URL
Traceback (most recent call last):
  File "/home/ccw/Repos/dcc/dcc/", line 30, in validate
    self.root = ET.fromstring(self.content)
  File "/usr/lib/python3.7/xml/etree/", line 1315, in XML
xml.etree.ElementTree.ParseError: mismatched tag: line 8, column 5

The cause is that the relevant entries in the cookie file have a prefix #HttpOnly_ (apparently to indicate that the HttpOnly cookie attribute was set). This MR changes the cookie file parsing so the prefix is ignored.

Merge request reports