You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ra...@apache.org on 2014/11/05 11:45:17 UTC

[23/50] [abbrv] git commit: updated refs/heads/master to 4c5f792

SAMLUtils: SAML user id should fit within the UUID VARCHAR(40) column

Signed-off-by: Rohit Yadav <ro...@shapeblue.com>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/6df0b9f6
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/6df0b9f6
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/6df0b9f6

Branch: refs/heads/master
Commit: 6df0b9f677984a85cc50fa964c4ead461f0a3063
Parents: cd52bed
Author: Rohit Yadav <ro...@shapeblue.com>
Authored: Fri Oct 31 00:30:39 2014 +0530
Committer: Rohit Yadav <ro...@shapeblue.com>
Committed: Fri Oct 31 00:39:20 2014 +0530

----------------------------------------------------------------------
 utils/src/org/apache/cloudstack/utils/auth/SAMLUtils.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6df0b9f6/utils/src/org/apache/cloudstack/utils/auth/SAMLUtils.java
----------------------------------------------------------------------
diff --git a/utils/src/org/apache/cloudstack/utils/auth/SAMLUtils.java b/utils/src/org/apache/cloudstack/utils/auth/SAMLUtils.java
index 36c4d0f..d129309 100644
--- a/utils/src/org/apache/cloudstack/utils/auth/SAMLUtils.java
+++ b/utils/src/org/apache/cloudstack/utils/auth/SAMLUtils.java
@@ -102,7 +102,8 @@ public class SAMLUtils {
     public static final String CERTIFICATE_NAME = "SAMLSP_CERTIFICATE";
 
     public static String createSAMLId(String uid) {
-        return SAML_NS + uid;
+        String samlUuid = SAML_NS + uid;
+        return samlUuid.length() > 40 ? samlUuid.substring(0, 40) : samlUuid;
     }
 
     public static Boolean checkSAMLUserId(String uuid) {