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

Re: multiple password prompts

From: Senthil Kumaran S <senthil_at_collab.net>
Date: Wed, 18 Jun 2008 12:09:26 +0530

Hi Stefan,

Stefan Sperling wrote:
> If you hard code *cached_answer to TRUE, you are overriding whatever
> answer the user gave you. After all, the user may have said 'no',
> in which case may_save_password is FALSE.
> The else condition at line number 297 you are referring to
> is not triggered based on whether *cached_answer is TRUE
> or FALSE. It's based on whether cached_answer is NULL or not.
> It is NULL if we cannot find an answer in the cache. The value
> of the answer (TRUE or FALSE) does not matter.

I missed the '&' before may_save_password in the following code:



hence, I came to this conclusion. Sorry for the noise :)

> Maybe the check should be rewritten to make this more clear,
> like this:
> Index: subversion/libsvn_subr/simple_providers.c
> ===================================================================
> --- subversion/libsvn_subr/simple_providers.c (revision 31725)
> +++ subversion/libsvn_subr/simple_providers.c (working copy)
> @@ -286,7 +286,7 @@ svn_auth__simple_save_creds_helper(svn_boolean_t *
> cached_answer = apr_hash_get(b->plaintext_answers,
> realmstring,
> - if (cached_answer)
> + if (cached_answer != NULL)
> may_save_password = *cached_answer;
> else
> {
> Do you agree or have I misunderstood you?

Yes I perfectly agree with you. Unfortunately I am unable to reproduce this in
my box today! Is googlecode.com the only way?

Senthil Kumaran S
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-18 08:40:20 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.