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

RE: [PATCH] issue 1780: Keyword values with dollar signs causebadness.

From: Lieven Govaerts <lgo_at_mobsol.be>
Date: 2006-01-15 00:00:14 CET

Hi,

I updated my patch of last week to fix issue 1780.

The algorithm implemented here isn't changed, so this patch will not solve
the problem of usernames starting or ending with '$'. It only solves user-
or filenames containing a '$'.

This patch contains:
- code changes to subst.c implementing the new algorithm
- unit tests in translate-test.c

Log message:

[[[
Fix issue #1780: correct keyword expansion when URL or Author value contains
'$'.

* subversion/libsvn_subr/subst.c
  (translate_chunk): add algorithm that keeps searching for next '$' until
valid keyword is found or search limits are reached.

* subversion/tests/libsvn_wc/translate-test.c
  (lines[]): added two lines to test on '$' in Author and URL keywords.
]]]

regards,

Lieven.

> -----Original Message-----
> From: Lieven Govaerts [mailto:lgo@mobsol.be]
> Sent: dinsdag 10 januari 2006 21:07
> To: 'John Peacock'; 'Michael Pilato'
> Cc: 'svn-dev'
> Subject: RE: [PATCH] issue 1780: Keyword values with dollar
> signs causebadness.
>
> Michael, John,
>
> > John Peacock wrote:
> >
> > Michael Pilato wrote:
> > > The algorithm is a pretty good one, though I think it still
> > falls down
> > > if, say, an Author's name begins with a '$'. The expanded
> > form would
> > > be '$ Author: $username $', which happens to be a superset of the
> > > completely valid format '$ Author: $'.
>
> You're absolutely right, this patch doesn't solve that
> situation, it will give the same result as the code without the patch.
>
> > Which brings up the topic of a generalized escaping mechanism for
> > keyword *values*, rather than trying larger and larger
> strings (as the
> > proposed patch does).
>
...
> Concerning performance, a keyword is not only limited by
> SVN_KEYWORD_MAX_LEN chars, but also by a '\r' or '\n'. So the
> only scenario where the performance is affected by this patch is with:
> - a file with keyword expasion enabled
> - containing very long lines without CR's
> - using filenames with $ signs.
>
> And even then, SVN_KEYWORD_MAX_LEN is defined as 255 for now,
> it will never exceed eg. 1024 right?
>

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.371 / Virus Database: 267.14.17/229 - Release Date: 13/01/2006
 
  


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Received on Sun Jan 15 00:03:21 2006

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