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

Re: [Fwd: Re: [BUG] svn_load_dirs.pl does not quote filenames when running shell]

From: Max Bowsher <maxb_at_ukf.net>
Date: 2004-12-14 17:00:30 CET

> Sviataslau Svirydau <Sviataslau_Svirydau@epam.com> writes:
>> Hello,
>>
>> I've found a bug in svn_load_dirs.pl. It passes filenames to shell as
>> is without quotation. This leads to fail if filename contain some
>> special characters. In my case I had filename with brackets and
>> svn_load_dirs.pl was failed when processing this file. I've managed to
>> fix it for me (see patch below), though I'm not an expert in perl, so
>> a solution might be not the best. Anyway, I think it's needed to quote
>> filenames anywhere when shell is called (I've fixed it for me at only
>> one place).
>>
>> PS I not subscribed to this list, so please CC me when answering
>>
>> PPS here is a patch:
>>
>> -----------------------------
>> --- svn_load_dirs.pl~ 2004-12-07 17:49:19 +0200
>> +++ svn_load_dirs.pl 2004-12-06 19:37:46 +0200
>> @@ -1162,7 +1162,7 @@ while (defined (my $load_dir = &get_next
>> keys %upd_files;
>> foreach my $upd_file (@upd_files)
>> {
>> - my @command = ($svn, 'propget', 'svn:eol-style', $upd_file);
>> + my @command = ($svn, 'propget',
>> 'svn:eol-style',"\'$upd_file\'"); my @lines =
>> read_from_process(@command); next unless @lines;
>> if (@lines > 1)
>> -----------------------------

Thankyou, but this patch is not OK.

svn_load_dirs.pl already contains quoting logic and/or direct execution
without a shell logic - it should work without this change!
Hacking in an additional pair of quotes in one location is not an solution -
we need to find out why the existing code isn't doing the job it is designed
to do.

Please tell us which OS you are using, and which version of svn_load_dirs.pl

Max.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Dec 14 17:02:55 2004

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.