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

Re: [PATCH] Fix issue #2242.

From: Daniel Shahaf <d.s_at_daniel.shahaf.co.il>
Date: Thu, 26 Jun 2008 08:47:47 +0300 (Jerusalem Daylight Time)

Daniel Shahaf wrote on Thu, 26 Jun 2008 at 08:39 +0300:
> Senthil Kumaran S wrote on Fri, 16 May 2008 at 16:19 +0530:
> > Index: subversion/libsvn_subr/simple_providers.c
> > ===================================================================
> > --- subversion/libsvn_subr/simple_providers.c (revision 31223)
> > +++ subversion/libsvn_subr/simple_providers.c (working copy)
> > @@ -97,12 +97,17 @@
> > apr_pool_t *pool)
> > {
> > svn_string_t *str;
> > - str = apr_hash_get(creds, SVN_AUTH__AUTHFILE_PASSWORD_KEY,
> > + str = apr_hash_get(creds, SVN_AUTH__AUTHFILE_USERNAME_KEY,
> > APR_HASH_KEY_STRING);
> > - if (str && str->data)
> > + if (strcmp(str->data, username) == 0)
> ^
>
> Can STR be NULL here? I prefer
>
> str = apr_hash_get(creds, SVN_AUTH__AUTHFILE_USERNAME_KEY,
> APR_HASH_KEY_STRING);
> if (str && strcmp(str->data, username) == 0)

Actually, the docstring for svn_auth__password_get_t says:

    It might be obtained directly from CREDS, or from an external store,
    using REALMSTRING and USERNAME as keys.
   
So don't we need compare the realms as well?

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-06-26 07:48:05 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.