Simple but critical failure - with patch
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
davfs2 (Ubuntu) |
Invalid
|
Medium
|
Unassigned |
Bug Description
Someone has introduced the following code into webdav.c, not sure when;
#if NE_VERSION_MINOR > 25
if (!has_if_match_bug && !*exists)
#endif /* NE_VERSION_MINOR > 25 */
If this is activated, it inserts an additional header into LOCK requests, like so;
static char *none_match_header = "If-None-Match: *\n";
Note; this SHOULD be "\r\n" on the end !!!
As a result, LOCK requests will fail on RFC compliant parsers that break up the header based on {line+CRLF} CRLF because it will miss the double CRLF used to indicate the end of the header section which results in the parser trying to parse the body as headers.
In particular, this breaks the Python TWISTED framework.
Adding "\r" before the "\n" on the declaration of none_match_header fixes the issue.
Note also; setting "if_match_bug = 1" in the config file looks like it should fix the problem - it does not (!)
tags: | added: patch |
Changed in davfs2 (Ubuntu): | |
importance: | Undecided → Medium |
status: | New → Triaged |
Changed in davfs2 (Ubuntu): | |
assignee: | Rolf Leggewie (r0lf) → nobody |
Gareth, thank you for supplying that patch. I am sorry nobody has picked it up so far. Upstream code has since changed but cursory code inspection at http:// sources. debian. net/src/ davfs2/ 1.5.2-1/ src/webdav. c/ seems to suggest this might still be a problem. Can you verify this?