Ticket #1324 (closed defect: fixed)

Opened 9 months ago

Last modified 3 months ago

authorization blocks OPTIONS

Reported by: HenrikHolst Assigned to: jan
Priority: normal Milestone: 1.4.19
Component: core Version: 1.4.18
Severity: normal Keywords: webdav patch bug auth OPTIONS
Cc: Blocking:
Need Feedback: 0

Description

If a client sends a OPTIONS method for a resource that is under authorization, then mod_auth blocks the other modules from inserting their options since it breaks the calling chain. To make matters worse, the lighttpd core sends a 200 for all OPTIONS requests.

One case where this fails miserably is webdav, the Windows Web Folders client and the davfs2 (neon based) filesystem checks for DAV compliance with OPTIONS before allowing a server. Since mod_auth blocks mod_webdav from inserting it's options and the reply is a 200 (so that the client does not know that it has to send it's credentials) the connection is refused by the client.

I have included a small patch which changes this last behaviour into replying with 401 if authorization is required. I have tested this against both neon and the Windows Web Folders Client and they both work properly now.

Debate is whether this is the correct fix or not. One other fix would be to let mod_auth skip it's checks if HTTP_METHOD_OPTIONS but then I cannot find support in the RFCs for such behaviour so I think that my patch is the correct one :)

Attachments

connections.patch (0.5 kB) - added by HenrikHolst on 08/24/2007 09:04:04 AM.
patch for connections.c

Change History

08/24/2007 09:04:04 AM changed by HenrikHolst

  • attachment connections.patch added.

patch for connections.c

10/02/2007 09:00:27 AM changed by HenrikHolst

  • keywords set to webdav patch bug auth OPTIONS.

10/11/2007 01:56:52 PM changed by simmel

  • version changed from 1.4.16 to 1.4.18.

I can confirm that this patch works with 1.4.18.

Using WebDAV with auth does NOT work WITHOUT this patch.

02/26/2008 04:30:14 PM changed by stbuehler

  • status changed from new to closed.
  • resolution set to fixed.

Fixed in [2086]


Add/Change #1324 (authorization blocks OPTIONS)




Change Properties
Action