[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: Stefan Sperling <stsp_at_elego.de>
Date: Sat, 14 Jun 2008 11:07:59 +0200

On Fri, Jun 13, 2008 at 03:58:57PM -0700, David Glasser wrote:
> -----------------------------------------------------------------------
> Store password unencrypted (yes/no)? yes

> -----------------------------------------------------------------------
> Store password unencrypted (yes/no)? yes
> A REDACTED/trunk
> A REDACTED/wiki
> ...
>
>
> Um. Why did it ask me the same question twice?

Huh. Oh well, I thought I had fixed this.

There are two RA sessions being opened. The answer you give to
the prompt during the first RA session should be cached and
reused in the second RA session.

I added support for this on the branch with the very long name
in r30793. There was a bug though, a pool life time issue caused
a crash when trying to retrieve the cached answer.
I fixed that in r30800.

There might be something wonky with the way I implemented this.
I have no idea why your answer isn't being cached. I tested this
over svn://, and it worked. Maybe it does not work over https
for some reason?

Anyway, this bit of code does not seem to be working as expected,
in case you want to help me dig into it:

subversion/libsvn_subr/simple-providers.c:

           else if (b->plaintext_prompt_func)
                {
                  /* We're interactive, and the client provided a
                   * prompt callback. So we can ask the user.
                   *
                   * Check for a cached answer before prompting. */
                  svn_boolean_t *cached_answer;
                  cached_answer = apr_hash_get(b->plaintext_answers,
                                               realmstring,
                                               APR_HASH_KEY_STRING);
                  if (cached_answer)
                    may_save_password = *cached_answer;
                  else
                    {
                      /* Nothing cached for this realm, prompt the user. */

Breaking at svn_auth__simple_save_creds_helper and looking what's
in the cache the second time is where I'd try looking first.

I'll setup a https server and try to reproduce.

Stefan

  • application/pgp-signature attachment: stored
Received on 2008-06-14 11:08:21 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.