On 6/15/07, Nathan Kidd <nathan-svn@spicycrypto.ca> wrote:
> Andy Levy wrote:
> > On 6/15/07, Diego Menta <diegomenta@gmail.com> wrote:
> >> this is the pre-commit.bat:
> >>
> >> setlocal
> >>
> >> set "REPOS=%~1"
> >> set "TXN=%~2"
> >> set "SVNLOOK=c:\progra~1\subversion\bin\svnlook.exe"
> >>
> >> :: Make sure that the log message contains some text.
> >> for /f "tokens=*" %%i in ('%SVNLOOK% log -t "%TXN%" "%REPOS%"') do set
> >> "LOGMSG=%%i"
> >> if not "%LOGMSG%"=="" exit 0
> >
> > Looks almost identical to my pre-commit.bat.
>
> Because, embarrasingly, I wrote that file and posted it to the svn users
> list last year. Embarrasing, because the way it's written is a big
> security hole that could be exploited by anyone with permission to commit.
>
> I've attached an updated script that is secure, but is a bit slower
> since it requires disk access due to the apparent brain-dead refusal of
> MS's findstr command to read STDIN.
>
> Diego, this file should be a drop-in replacement for what you've got
> (but without your translated error message), and won't choke on quote
> characters.
Nathan,
Thanks for your work on this. I just dropped the script in and it does
allow me to put quotes in my log message - good news!
The bad news is that it caused Apache (2.0.59, SVN 1.4.3) to crash
when I committed with an empty log message. Unfortunately I don't have
much of an error message to work from as far as the source of the
crash.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: users-help@tortoisesvn.tigris.org
Received on Tue Jun 19 15:36:51 2007