Simple but critical failure - with patch

Bug #933381 reported by Gareth Bult
6
This bug affects 1 person
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)
        ne_hook_pre_send(session, add_header, none_match_header);
#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: patch
Rolf Leggewie (r0lf)
tags: added: patch
Changed in davfs2 (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Rolf Leggewie (r0lf) wrote :

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?

Changed in davfs2 (Ubuntu):
assignee: nobody → Rolf Leggewie (r0lf)
Revision history for this message
Rolf Leggewie (r0lf) wrote :

I believe the relevant code is now line 918, isn't it?

Revision history for this message
Rolf Leggewie (r0lf) wrote :

ping Gareth

Rolf Leggewie (r0lf)
Changed in davfs2 (Ubuntu):
assignee: Rolf Leggewie (r0lf) → nobody
Revision history for this message
Woodrow Shen (woodrow-shen) wrote :

It should be fixed by upstream 1.4.7, so I'd like to set it to invalid.

Changed in davfs2 (Ubuntu):
status: Triaged → Invalid
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.