manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1503134 - /manifoldcf/branches/CONNECTORS-737/connectors/jcifs/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharedrive/SharedDriveConnector.java
Date Mon, 15 Jul 2013 08:32:31 GMT
Author: kwright
Date: Mon Jul 15 08:32:30 2013
New Revision: 1503134

URL: http://svn.apache.org/r1503134
Log:
Add password protection to jcifs connector

Modified:
    manifoldcf/branches/CONNECTORS-737/connectors/jcifs/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharedrive/SharedDriveConnector.java

Modified: manifoldcf/branches/CONNECTORS-737/connectors/jcifs/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharedrive/SharedDriveConnector.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-737/connectors/jcifs/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharedrive/SharedDriveConnector.java?rev=1503134&r1=1503133&r2=1503134&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-737/connectors/jcifs/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharedrive/SharedDriveConnector.java
(original)
+++ manifoldcf/branches/CONNECTORS-737/connectors/jcifs/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharedrive/SharedDriveConnector.java
Mon Jul 15 08:32:30 2013
@@ -46,6 +46,7 @@ import org.apache.manifoldcf.agents.inte
 import org.apache.manifoldcf.agents.interfaces.ServiceInterruption;
 import org.apache.manifoldcf.core.interfaces.IThreadContext;
 import org.apache.manifoldcf.core.interfaces.IHTTPOutput;
+import org.apache.manifoldcf.core.interfaces.IPasswordMapperActivity;
 import org.apache.manifoldcf.core.interfaces.IPostParameters;
 import org.apache.manifoldcf.core.interfaces.ConfigParams;
 import org.apache.manifoldcf.core.interfaces.ManifoldCFException;
@@ -2634,15 +2635,18 @@ public class SharedDriveConnector extend
     Locale locale, ConfigParams parameters, String tabName)
     throws ManifoldCFException, IOException
   {
-    String server   = parameters.getParameter(org.apache.manifoldcf.crawler.connectors.sharedrive.SharedDriveParameters.server);
+    String server   = parameters.getParameter(SharedDriveParameters.server);
     if (server==null) server = "";
-    String domain = parameters.getParameter(org.apache.manifoldcf.crawler.connectors.sharedrive.SharedDriveParameters.domain);
+    String domain = parameters.getParameter(SharedDriveParameters.domain);
     if (domain==null) domain = "";
-    String username = parameters.getParameter(org.apache.manifoldcf.crawler.connectors.sharedrive.SharedDriveParameters.username);
+    String username = parameters.getParameter(SharedDriveParameters.username);
     if (username==null) username = "";
-    String password = parameters.getObfuscatedParameter(org.apache.manifoldcf.crawler.connectors.sharedrive.SharedDriveParameters.password);
-    if (password==null) password = "";
-    String resolvesids = parameters.getParameter(org.apache.manifoldcf.crawler.connectors.sharedrive.SharedDriveParameters.useSIDs);
+    String password = parameters.getObfuscatedParameter(SharedDriveParameters.password);
+    if (password==null)
+      password = "";
+    else
+      password = out.mapPasswordToKey(password);
+    String resolvesids = parameters.getParameter(SharedDriveParameters.useSIDs);
     if (resolvesids==null) resolvesids = "true";
 
     // "Server" tab
@@ -2704,19 +2708,19 @@ public class SharedDriveConnector extend
   {
     String server = variableContext.getParameter("server");
     if (server != null)
-      parameters.setParameter(org.apache.manifoldcf.crawler.connectors.sharedrive.SharedDriveParameters.server,server);
+      parameters.setParameter(SharedDriveParameters.server,server);
 	
     String domain = variableContext.getParameter("domain");
     if (domain != null)
-      parameters.setParameter(org.apache.manifoldcf.crawler.connectors.sharedrive.SharedDriveParameters.domain,domain);
+      parameters.setParameter(SharedDriveParameters.domain,domain);
 	
     String username = variableContext.getParameter("username");
     if (username != null)
-      parameters.setParameter(org.apache.manifoldcf.crawler.connectors.sharedrive.SharedDriveParameters.username,username);
+      parameters.setParameter(SharedDriveParameters.username,username);
 		
     String password = variableContext.getParameter("password");
     if (password != null)
-      parameters.setObfuscatedParameter(org.apache.manifoldcf.crawler.connectors.sharedrive.SharedDriveParameters.password,password);
+      parameters.setObfuscatedParameter(SharedDriveParameters.password,variableContext.mapKeyToPassword(password));
     
     String resolvesidspresent = variableContext.getParameter("resolvesidspresent");
     if (resolvesidspresent != null)



Mime
View raw message