Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2007-05-27 21:14:51 +0000
committerslewis2007-05-27 21:14:51 +0000
commit2325ef8f7ee4959e91f57e29572cd7d36f901d09 (patch)
tree168666008c2f125c203f724ea4524027e80abd86 /providers/bundles
parentb7268b08f567976b18e3fa8b4607d74aaeb00981 (diff)
downloadorg.eclipse.ecf-2325ef8f7ee4959e91f57e29572cd7d36f901d09.tar.gz
org.eclipse.ecf-2325ef8f7ee4959e91f57e29572cd7d36f901d09.tar.xz
org.eclipse.ecf-2325ef8f7ee4959e91f57e29572cd7d36f901d09.zip
Fixed handling of irc password caching.
Diffstat (limited to 'providers/bundles')
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.irc.ui/src/org/eclipse/ecf/internal/irc/ui/wizards/IRCConnectWizard.java2
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.irc.ui/src/org/eclipse/ecf/internal/irc/ui/wizards/IRCConnectWizardPage.java10
2 files changed, 9 insertions, 3 deletions
diff --git a/providers/bundles/org.eclipse.ecf.provider.irc.ui/src/org/eclipse/ecf/internal/irc/ui/wizards/IRCConnectWizard.java b/providers/bundles/org.eclipse.ecf.provider.irc.ui/src/org/eclipse/ecf/internal/irc/ui/wizards/IRCConnectWizard.java
index 6917da072..21c08f45f 100644
--- a/providers/bundles/org.eclipse.ecf.provider.irc.ui/src/org/eclipse/ecf/internal/irc/ui/wizards/IRCConnectWizard.java
+++ b/providers/bundles/org.eclipse.ecf.provider.irc.ui/src/org/eclipse/ecf/internal/irc/ui/wizards/IRCConnectWizard.java
@@ -86,7 +86,7 @@ public final class IRCConnectWizard extends Wizard implements IConnectWizard {
page.saveComboItems();
new AsynchContainerConnectAction(container, targetID, connectContext, null, new Runnable() {
public void run() {
- cachePassword(connectID,password);
+ cachePassword(page.getPasswordKeyFromUserName(connectID),password);
}}).run();
}
diff --git a/providers/bundles/org.eclipse.ecf.provider.irc.ui/src/org/eclipse/ecf/internal/irc/ui/wizards/IRCConnectWizardPage.java b/providers/bundles/org.eclipse.ecf.provider.irc.ui/src/org/eclipse/ecf/internal/irc/ui/wizards/IRCConnectWizardPage.java
index 0c06d2bff..f23af546c 100644
--- a/providers/bundles/org.eclipse.ecf.provider.irc.ui/src/org/eclipse/ecf/internal/irc/ui/wizards/IRCConnectWizardPage.java
+++ b/providers/bundles/org.eclipse.ecf.provider.irc.ui/src/org/eclipse/ecf/internal/irc/ui/wizards/IRCConnectWizardPage.java
@@ -55,7 +55,6 @@ final class IRCConnectWizardPage extends WizardPage {
private void verify() {
String text = connectText.getText();
- passwordText.setText("");
if (text.equals("")) { //$NON-NLS-1$
updateStatus(Messages.IRCConnectWizardPage_STATUS_MESSAGE_EMPTY);
} else if (text.indexOf('@') == -1) {
@@ -66,8 +65,14 @@ final class IRCConnectWizardPage extends WizardPage {
}
}
+ protected String getPasswordKeyFromUserName(String username) {
+ if (username == null || username.equals("")) return null;
+ else {
+ return username.substring(0,username.indexOf("/"));
+ }
+ }
protected void restorePassword(String username) {
- PasswordCacheHelper pwStorage = new PasswordCacheHelper(username);
+ PasswordCacheHelper pwStorage = new PasswordCacheHelper(getPasswordKeyFromUserName(username));
String pw = pwStorage.retrievePassword();
if (pw != null) {
passwordText.setText(pw);
@@ -94,6 +99,7 @@ final class IRCConnectWizardPage extends WizardPage {
verify();
}
public void widgetSelected(SelectionEvent e) {
+ passwordText.setText("");
verify();
}});

Back to the top