nifi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcgil...@apache.org
Subject nifi git commit: NIFI-655: - Ensuring the user identity is not too long.
Date Mon, 23 Nov 2015 17:14:14 GMT
Repository: nifi
Updated Branches:
  refs/heads/NIFI-655 ec50a2de8 -> 5ef53b6fe


NIFI-655:
- Ensuring the user identity is not too long.

Project: http://git-wip-us.apache.org/repos/asf/nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/nifi/commit/5ef53b6f
Tree: http://git-wip-us.apache.org/repos/asf/nifi/tree/5ef53b6f
Diff: http://git-wip-us.apache.org/repos/asf/nifi/diff/5ef53b6f

Branch: refs/heads/NIFI-655
Commit: 5ef53b6fe349c1eb2a1f5d5b91435a5745f57571
Parents: ec50a2d
Author: Matt Gilman <matt.c.gilman@gmail.com>
Authored: Mon Nov 23 12:14:01 2015 -0500
Committer: Matt Gilman <matt.c.gilman@gmail.com>
Committed: Mon Nov 23 12:14:01 2015 -0500

----------------------------------------------------------------------
 .../java/org/apache/nifi/admin/dao/impl/StandardUserDAO.java    | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/nifi/blob/5ef53b6f/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-administration/src/main/java/org/apache/nifi/admin/dao/impl/StandardUserDAO.java
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-administration/src/main/java/org/apache/nifi/admin/dao/impl/StandardUserDAO.java
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-administration/src/main/java/org/apache/nifi/admin/dao/impl/StandardUserDAO.java
index 8292cac..7648f22 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-administration/src/main/java/org/apache/nifi/admin/dao/impl/StandardUserDAO.java
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-administration/src/main/java/org/apache/nifi/admin/dao/impl/StandardUserDAO.java
@@ -466,6 +466,11 @@ public class StandardUserDAO implements UserDAO {
         if (user.getIdentity() == null) {
             throw new IllegalArgumentException("User identity must be specified.");
         }
+        
+        // ensure the user identity is not too lengthy
+        if (user.getIdentity().length() > 4096) {
+            throw new IllegalArgumentException("User identity must be less than 4096 characters.");
+        }
 
         PreparedStatement statement = null;
         ResultSet rs = null;


Mime
View raw message