diff --git a/uportal-impl/src/main/java/org/jasig/portal/LoginServlet.java b/uportal-impl/src/main/java/org/jasig/portal/LoginServlet.java
index <HASH>..<HASH> 100644
--- a/uportal-impl/src/main/java/org/jasig/portal/LoginServlet.java
+++ b/uportal-impl/src/main/java/org/jasig/portal/LoginServlet.java
@@ -206,7 +206,14 @@ public class LoginServlet extends HttpServlet {
       }
       // null value causes exception in context.authentication
       // alternately we could just not set parm if value is null
-      parmValue = (parmValue == null ? "" : parmValue).trim();
+      if("password".equals(parmName)){
+    	  // make sure we don't trim passwords, since they might have
+    	  // leading or trailing spaces
+    	  parmValue = (parmValue == null ? "" : parmValue);
+   	  } else {
+    	  parmValue = (parmValue == null ? "" : parmValue).trim();
+   	  }
+
       // The relationship between the way the properties are stored and the way
       // the subcontexts are named has to be closely looked at to make this work.
       // The keys are either "root" or the subcontext name that follows "root.". As
UP-<I> Don't trim password parameters, since users may legitimately have a password with a leading or trailing space.

git-svn-id: <URL>