Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorspingel2009-09-20 06:57:59 +0000
committerspingel2009-09-20 06:57:59 +0000
commitdbe020c085ea78ba8092e6628fe93f49dc7165d9 (patch)
tree1a789da4c924e545a7e4b43fb9c021561a088e98 /org.eclipse.mylyn.trac.ui/src/org
parentb56965a9e0fd0e23f7765d1cac395ea3669559da (diff)
downloadorg.eclipse.mylyn.tasks-dbe020c085ea78ba8092e6628fe93f49dc7165d9.tar.gz
org.eclipse.mylyn.tasks-dbe020c085ea78ba8092e6628fe93f49dc7165d9.tar.xz
org.eclipse.mylyn.tasks-dbe020c085ea78ba8092e6628fe93f49dc7165d9.zip
NEW - bug 279746: authentification fails if NTLM is required but no domain is specified
https://bugs.eclipse.org/bugs/show_bug.cgi?id=279746
Diffstat (limited to 'org.eclipse.mylyn.trac.ui/src/org')
-rw-r--r--org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/Messages.java2
-rw-r--r--org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/TracRepositorySettingsPage.java10
-rw-r--r--org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/messages.properties1
3 files changed, 13 insertions, 0 deletions
diff --git a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/Messages.java b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/Messages.java
index eec8b8dcf..e6c9afe86 100644
--- a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/Messages.java
+++ b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/Messages.java
@@ -109,5 +109,7 @@ public class Messages extends NLS {
public static String TracRepositorySettingsPage_No_Trac_repository_found_at_url;
+ public static String TracRepositorySettingsPage_NTLM_authentication_requested_Error;
+
public static String TracRepositorySettingsPage_Trac_Repository_Settings;
}
diff --git a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/TracRepositorySettingsPage.java b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/TracRepositorySettingsPage.java
index 62bbd5afe..d67a1b026 100644
--- a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/TracRepositorySettingsPage.java
+++ b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/TracRepositorySettingsPage.java
@@ -21,6 +21,8 @@ import org.eclipse.core.runtime.MultiStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.mylyn.commons.core.StatusHandler;
import org.eclipse.mylyn.commons.net.AbstractWebLocation;
+import org.eclipse.mylyn.commons.net.AuthenticationCredentials;
+import org.eclipse.mylyn.commons.net.AuthenticationType;
import org.eclipse.mylyn.internal.trac.core.TracClientFactory;
import org.eclipse.mylyn.internal.trac.core.TracCorePlugin;
import org.eclipse.mylyn.internal.trac.core.client.ITracClient;
@@ -186,6 +188,14 @@ public class TracRepositorySettingsPage extends AbstractRepositorySettingsPage {
throw new CoreException(RepositoryStatus.createStatus(repositoryUrl, IStatus.ERROR,
TracUiPlugin.ID_PLUGIN, INVALID_REPOSITORY_URL));
} catch (TracLoginException e) {
+ if (e.isNtlmAuthRequested()) {
+ AuthenticationCredentials credentials = taskRepository.getCredentials(AuthenticationType.REPOSITORY);
+ if (!credentials.getUserName().contains("\\")) { //$NON-NLS-1$
+ throw new CoreException(
+ RepositoryStatus.createStatus(repositoryUrl, IStatus.ERROR, TracUiPlugin.ID_PLUGIN,
+ Messages.TracRepositorySettingsPage_NTLM_authentication_requested_Error));
+ }
+ }
throw new CoreException(RepositoryStatus.createStatus(repositoryUrl, IStatus.ERROR,
TracUiPlugin.ID_PLUGIN, INVALID_LOGIN));
} catch (TracPermissionDeniedException e) {
diff --git a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/messages.properties b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/messages.properties
index a1b5ede07..aadda7252 100644
--- a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/messages.properties
+++ b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/messages.properties
@@ -52,4 +52,5 @@ TracRepositorySettingsPage_Authentication_credentials_valid_Update_to_latest_Xml
TracRepositorySettingsPage_Automatic__Use_Validate_Settings_=Automatic (Use Validate Settings)
TracRepositorySettingsPage_EXAMPLE_HTTP_TRAC_EDGEWALL_ORG=Example: http://trac.edgewall.org
TracRepositorySettingsPage_No_Trac_repository_found_at_url=No Trac repository found at url
+TracRepositorySettingsPage_NTLM_authentication_requested_Error=NTLM authentication failed. Verify that the username is in the format 'DOMAIN\\user' and NTLM v1 is used.
TracRepositorySettingsPage_Trac_Repository_Settings=Trac Repository Settings

Back to the top