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