[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[vidalia-svn] r1857: Don't save the authentication method we get from protocolinf (in trunk: . src/gui)
Author: edmanm
Date: 2007-08-22 22:15:25 -0400 (Wed, 22 Aug 2007)
New Revision: 1857
Modified:
trunk/
trunk/src/gui/mainwindow.cpp
Log:
r2036@adrastea: edmanm | 2007-08-22 22:15:15 -0400
Don't save the authentication method we get from protocolinfo, because we may
be connected to a Tor we did not start that has a dumb authentication method
you don't want to use when you switch to a different Tor.
Property changes on: trunk
___________________________________________________________________
svk:merge ticket from /vidalia/local/trunk [r2036] on 54b3572a-7227-0410-958f-53ecd705b71a
Modified: trunk/src/gui/mainwindow.cpp
===================================================================
--- trunk/src/gui/mainwindow.cpp 2007-08-23 01:58:58 UTC (rev 1856)
+++ trunk/src/gui/mainwindow.cpp 2007-08-23 02:15:25 UTC (rev 1857)
@@ -712,18 +712,18 @@
updateTorStatus(Authenticating);
+ authMethod = settings.getAuthenticationMethod();
pi = _torControl->protocolInfo();
if (!pi.isEmpty()) {
QStringList authMethods = pi.authMethods();
if (authMethods.contains("COOKIE"))
- settings.setAuthenticationMethod(TorSettings::CookieAuth);
+ authMethod = TorSettings::CookieAuth;
else if (authMethods.contains("HASHEDPASSWORD"))
- settings.setAuthenticationMethod(TorSettings::PasswordAuth);
+ authMethod = TorSettings::PasswordAuth;
else if (authMethods.contains("NULL"))
- settings.setAuthenticationMethod(TorSettings::NullAuth);
+ authMethod = TorSettings::NullAuth;
}
-
- authMethod = settings.getAuthenticationMethod();
+
if (authMethod == TorSettings::CookieAuth) {
/* Try to load an auth cookie and send it to Tor */
QByteArray cookie = loadControlCookie(pi.cookieAuthFile());