[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: bug: null user passed to pre-revprop-change when using WebDAV?

From: C. Michael Pilato <cmpilato_at_collab.net>
Date: Fri, 19 Jun 2009 15:10:51 -0400

James Ralston wrote:
> [I submitted this to the users list on 2009-05-01, but received no
> responses.]
>
> Consider the follow pre-revprop-change hook script:
>
> #! /bin/sh
> exec 1>`mktemp -t revprop-change-XXXXXXXX` 2>&1
> set -x
> echo "$@"
> exit 0
>
> When accessing the repository via the local filesystem, the output
> produced when the hook script is invoked to process this command:
>
> $ svn propedit -r HEAD --revprop svn:log \
> file:///home/testuser/repo/test
>
> Is:
>
> + echo /home/testuser/repo/test 1 testuser svn:log M
> /home/testuser/repo/test 1 testuser svn:log M
> + exit 0
>
> But when I instead edit a property via WebDAV, like this:
>
> $ svn propedit -r HEAD --revprop svn:log \
> http://svn.example.com/test/
>
> When the hook script fires, the output is:
>
> + echo /var/www/svn/repo/test 70 '' svn:log M
> /var/www/svn/repo/test 70 svn:log M
> + exit 0
>
> Instead of passing in the user to the hook script, Subversion passed
> in a null string.

Technically (in C-speak), Subversion supplies an empty string, not a NULL one.

What you are seeing is not a bug, though. It's the expected result of you
apparently running a WebDAV server which requires no authentication. The
Apache auth model -- and Subversion's fit inside of it -- is such that any
operation that doesn't explicitly require authentication will be performed
without out. No authentication means Apache (and Subversion/mod_dav_svn by
extension) has no username to work with. Subversion only applies such a
username if it first attempts the operation without one and is told by
Apache, "Sorry -- I need authn creds."

-- 
C. Michael Pilato <cmpilato_at_collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2363644

Received on 2009-06-19 21:11:20 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.