ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jonathanhur...@apache.org
Subject [29/34] ambari git commit: AMBARI-20772. FE: Characters used in usernames should be constrained (alexantonenko)
Date Wed, 26 Apr 2017 18:01:35 GMT
AMBARI-20772. FE: Characters used in usernames should be constrained (alexantonenko)


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

Branch: refs/heads/branch-feature-AMBARI-12556
Commit: 6bd1addfbbf81287e6d36a5cad7422b518228cb5
Parents: 9c0162c
Author: Alex Antonenko <hiveww@gmail.com>
Authored: Tue Apr 25 20:58:59 2017 +0300
Committer: Alex Antonenko <hiveww@gmail.com>
Committed: Wed Apr 26 17:14:28 2017 +0300

----------------------------------------------------------------------
 .../src/main/resources/ui/admin-web/app/scripts/i18n.config.js     | 2 +-
 .../src/main/resources/ui/admin-web/app/views/users/create.html    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/6bd1addf/ambari-admin/src/main/resources/ui/admin-web/app/scripts/i18n.config.js
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/i18n.config.js b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/i18n.config.js
index fba8538..fd2c6e5 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/i18n.config.js
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/i18n.config.js
@@ -307,7 +307,7 @@ angular.module('ambariAdminConsole')
     'users.showAll': 'Show all users',
     'users.showAdmin': 'Show only admin users',
     'users.groupMembership': 'Group Membership',
-    'users.userNameTip': 'Only alpha-numeric characters, up to 80 characters',
+    'users.userNameTip': 'Maximum length is 80 characters. \\, &, |, <, >, ` are
not allowed.',
 
     'users.changeStatusConfirmation.title': 'Change Status',
     'users.changeStatusConfirmation.message': 'Are you sure you want to change status for
user "{{userName}}" to {{status}}?',

http://git-wip-us.apache.org/repos/asf/ambari/blob/6bd1addf/ambari-admin/src/main/resources/ui/admin-web/app/views/users/create.html
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/views/users/create.html b/ambari-admin/src/main/resources/ui/admin-web/app/views/users/create.html
index cc5d8d4..80a3b04 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/views/users/create.html
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/views/users/create.html
@@ -34,7 +34,7 @@
         placeholder="{{'users.userName' | translate}}"
         ng-model="user.user_name"
         ng-required="true"
-        ng-pattern="/^\w*$/"
+        ng-pattern="/^[^<>&`|\\]+$/"
         ng-maxlength="80"
         tooltip="{{'users.userNameTip' | translate}}"
         autocomplete="off"


Mime
View raw message