This is an automated email from the ASF dual-hosted git repository. dahn pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/master by this push: new d23f4b0 Remove 'md5Hashed' variable from Javascript. (#2555) d23f4b0 is described below commit d23f4b08dad96007396663a53fff8c339db1b80a Author: Rafael Weingärtner <rafaelweingart...@gmail.com> AuthorDate: Fri Apr 13 05:43:52 2018 -0300 Remove 'md5Hashed' variable from Javascript. (#2555) We no longer hash password in the user side. All of the password processing is executed in the server side according to the priority of hashing mechanism defined by the administrator. --- ui/scripts/accounts.js | 6 ------ ui/scripts/accountsWizard.js | 12 ++---------- ui/scripts/cloudStack.js | 6 +----- ui/scripts/installWizard.js | 2 +- ui/scripts/sharedFunctions.js | 4 ---- 5 files changed, 4 insertions(+), 26 deletions(-) diff --git a/ui/scripts/accounts.js b/ui/scripts/accounts.js index a9f7381..529e5e3 100644 --- a/ui/scripts/accounts.js +++ b/ui/scripts/accounts.js @@ -1359,9 +1359,6 @@ }; var password = args.data.password; - if (md5Hashed) { - password = $.md5(password); - } $.extend(data, { password: password }); @@ -1502,9 +1499,6 @@ var password = args.data.newPassword; - if (md5Hashed) - password = $.md5(password); - $.ajax({ url: createURL('updateUser'), data: { diff --git a/ui/scripts/accountsWizard.js b/ui/scripts/accountsWizard.js index 7fc4014..78d4dd5 100644 --- a/ui/scripts/accountsWizard.js +++ b/ui/scripts/accountsWizard.js @@ -205,20 +205,12 @@ } if (!ldapStatus) { - var password = args.data.password; - if (md5Hashed) { - password = $.md5(password); - } array1.push("&email=" + args.data.email); array1.push("&firstname=" + args.data.firstname); array1.push("&lastname=" + args.data.lastname); - password = args.data.password; - if (md5Hashed) { - password = $.md5(password); - } else { - password = todb(password); - } + var password = args.data.password; + password = todb(password); array1.push("&password=" + password); } diff --git a/ui/scripts/cloudStack.js b/ui/scripts/cloudStack.js index 1190133..f2173e1 100644 --- a/ui/scripts/cloudStack.js +++ b/ui/scripts/cloudStack.js @@ -223,11 +223,7 @@ var array1 = []; array1.push("&username=" + encodeURIComponent(args.data.username)); - var password; - if (md5HashedLogin) - password = $.md5(args.data.password); - else - password = todb(args.data.password); + var password = todb(args.data.password); array1.push("&password=" + password); var domain; diff --git a/ui/scripts/installWizard.js b/ui/scripts/installWizard.js index 9d7c23d..8ba82dd 100644 --- a/ui/scripts/installWizard.js +++ b/ui/scripts/installWizard.js @@ -35,7 +35,7 @@ url: createURL('updateUser'), data: { id: cloudStack.context.users[0].userid, - password: md5Hashed ? $.md5(args.data.password) : args.data.password + password: args.data.password }, type: 'POST', dataType: 'json', diff --git a/ui/scripts/sharedFunctions.js b/ui/scripts/sharedFunctions.js index 923ab76..a2dc4eb 100644 --- a/ui/scripts/sharedFunctions.js +++ b/ui/scripts/sharedFunctions.js @@ -45,10 +45,6 @@ var ERROR_INTERNET_NAME_NOT_RESOLVED = 12007; var ERROR_INTERNET_CANNOT_CONNECT = 12029; var ERROR_VMOPS_ACCOUNT_ERROR = 531; -// Default password is MD5 hashed. Set the following variable to false to disable this. -var md5Hashed = false; -var md5HashedLogin = false; - //page size for API call (e.g."listXXXXXXX&pagesize=N" ) var pageSize = 20; //var pageSize = 1; //for testing only -- To stop receiving notification emails like this one, please contact d...@apache.org.