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

Re: [Subclipse-users] svnClientAdapter reads cached passwords from wrong folder

From: Mark Phippard <markphip_at_gmail.com>
Date: 2006-11-23 23:34:46 CET

On 11/23/06, Staffan Olsson <solsson@gmail.com> wrote:

> With setConfigDirectory in svnClientAdapter, it seems that cached
> credentials are still read from the default runtime configuration area.
> My application creates a new ISVNClientAdapter, runs setConfigDirctory with
> a new folder, but still gets the cached credentials from other svn clients.
> The setConfigDirectory call seems to work, because it creates the default
> config structure. If I delete the default config folder (in user profile)
> login fails, as it should.
> -----
> File configFolder = new File("configarea");
> File wc = new File("wc");
> JhlClientAdapterFactory.setup();
> ISVNClientAdapter client =
> SVNClientAdapterFactory.createSVNClient(
> JhlClientAdapterFactory.JAVAHL_CLIENT);
> client.setConfigDirectory(configFolder);
> assertTrue("Should have created default config",
> configFolder.exists());
> try {
> client.setUsername("test");
> client.checkout(
> new SVNUrl("
> http://localhost/testrepo/test/trunk/"),
> wc, SVNRevision.HEAD, true);
> } catch (SVNClientException e) {
> // expected, no password set
> }
> assertFalse("invalid login -> no checkout", new File(wc,
> ".svn").exists());
> -----
> The test fails on the last assert, but passes if I delete the Subversion
> folder from Application Data. Did I misunderstand setConfigDirectory? The
> 'svn' client in command prompt with --config-dir works as expected (fails to
> login).
> Can this be related to the caching issues discussed in
> http://svn.haxx.se/dev/archive-2006-11/0100.shtml? A
> mysterious 'auth' folder shows up every time the javahl client is created.

I am aware of this issue and have already reported it to the
Subversion devs. As far as I can tell, this bug lies within JavaHL.
If you think the problem lies within svnClientAdapter, by all means
submit a patch that fixes it. It would be great if this was something
we could fix ourselves.


To unsubscribe, e-mail: users-unsubscribe@subclipse.tigris.org
For additional commands, e-mail: users-help@subclipse.tigris.org
Received on Thu Nov 23 23:34:52 2006

This is an archived mail posted to the Subclipse Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.