dcc merge requestshttps://git.ligo.org/sean-leavey/dcc/-/merge_requests2022-02-28T07:56:18Zhttps://git.ligo.org/sean-leavey/dcc/-/merge_requests/4Store authorid in DCCAuthor2022-02-28T07:56:18ZDuncan Macleodduncan.macleod@ligo.orgStore authorid in DCCAuthorThis MR adds an `authorid` attribute for the `DCCAuthor`, which is apparently distinct from the `employeenumber`. I think the `authorid` is the crucial ID required for DocumentAdd (creating new versions of documents).This MR adds an `authorid` attribute for the `DCCAuthor`, which is apparently distinct from the `employeenumber`. I think the `authorid` is the crucial ID required for DocumentAdd (creating new versions of documents).https://git.ligo.org/sean-leavey/dcc/-/merge_requests/3Allow updating DCC metadata2022-01-12T08:28:32ZChristopher WipfAllow updating DCC metadataThis MR adds support for updating DCC metadata to the `HttpFetcher` and the CLI.
This should probably get added to `DccRecord` as well, but it wasn't obvious to me how to incorporate it, so I leave that for another MR.
Addresses #12This MR adds support for updating DCC metadata to the `HttpFetcher` and the CLI.
This should probably get added to `DccRecord` as well, but it wasn't obvious to me how to incorporate it, so I leave that for another MR.
Addresses #12https://git.ligo.org/sean-leavey/dcc/-/merge_requests/2Ignore HttpOnly attribute in cookie file2022-01-10T08:36:16ZChristopher WipfIgnore HttpOnly attribute in cookie fileI 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 https://dcc.ligo.org/E1200123/of=xml
Authentication failure, ...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 https://dcc.ligo.org/E1200123/of=xml
Authentication failure, retrieving new cookie...
Fetching cookies for: https://dcc.ligo.org/dcc
Found cookie file: /tmp/ecpcookie.u1000
Fetching contents at URL https://dcc.ligo.org/E1200123/of=xml
Traceback (most recent call last):
File "/home/ccw/Repos/dcc/dcc/patterns.py", line 30, in validate
self.root = ET.fromstring(self.content)
File "/usr/lib/python3.7/xml/etree/ElementTree.py", line 1315, in XML
parser.feed(text)
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](https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies#restrict_access_to_cookies) was set). This MR changes the cookie file parsing so the prefix is ignored.