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

Case sensitivity in authz files

From: Philip Martin <philip.martin_at_wandisco.com>
Date: Wed, 24 Apr 2013 16:08:58 +0100

Consider an authz file:

   [/]
   pm = rw
   PM = r

When we parse the key=value lines we handle the key case-insensitively
so only one value, the last, gets stored as the second value overrides
the first. However we also store the exact case of the first key and
that is what is checked when querying:

   $ svnauthz accessof authz.txt --username PM
   no
   $ svnauthz accessof authz.txt --username pm
   r

the effective line is "pm = r" which is not something that occurs in the
file.

If I reverse the order:

   [/]
   PM = r
   pm = rw

I get:
   
   $ svnauthz accessof authz.txt --username PM
   rw
   $ svnauthz accessof authz.txt --username pm
   no

so the effective line is "PM = rw".

We made the section names, the [...] bits, case-sensitive:
http://subversion.tigris.org/issues/show_bug.cgi?id=3781

Should we switch to case-sensitive parsing for the rest of the file?

-- 
Certified & Supported Apache Subversion Downloads:
http://www.wandisco.com/subversion/download
Received on 2013-04-24 17:09:54 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.