cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From raj...@apache.org
Subject [23/50] [abbrv] git commit: updated refs/heads/master to 4c5f792
Date Wed, 05 Nov 2014 10:45:17 GMT
SAMLUtils: SAML user id should fit within the UUID VARCHAR(40) column

Signed-off-by: Rohit Yadav <rohit.yadav@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 <rohit.yadav@shapeblue.com>
Authored: Fri Oct 31 00:30:39 2014 +0530
Committer: Rohit Yadav <rohit.yadav@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) {


Mime
View raw message