bug 8313: still encrypt the passwords when setting up account

This commit is contained in:
Abhinandan Prateek 2011-12-05 13:08:53 +05:30
parent 1dee569f0e
commit 426b464aab
3 changed files with 6 additions and 4 deletions

View File

@ -16,7 +16,8 @@
* *
*/ */
// Default password is MD5 hashed. Set the following variable to false to disable this. // Default password is MD5 hashed. Set the following variable to false to disable this.
var md5Hashed = false; var md5Hashed = true;
var md5HashedLogin = false;
$(document).ready(function() { $(document).ready(function() {
function initUI() { function initUI() {
@ -659,7 +660,7 @@ $(document).ready(function() {
array1.push("&username="+encodeURIComponent(username)); array1.push("&username="+encodeURIComponent(username));
var password = $("#account_password").val(); var password = $("#account_password").val();
if (md5Hashed) { if (md5HashedLogin) {
password = $.md5(password); password = $.md5(password);
} }
array1.push("&password="+password); array1.push("&password="+password);

View File

@ -136,7 +136,7 @@
array1.push("&username=" + encodeURIComponent(args.data.username)); array1.push("&username=" + encodeURIComponent(args.data.username));
var password; var password;
if (md5Hashed) if (md5HashedLogin)
password = $.md5(args.data.password); password = $.md5(args.data.password);
else else
password = args.data.password; password = args.data.password;

View File

@ -22,7 +22,8 @@ var ERROR_INTERNET_CANNOT_CONNECT = 12029;
var ERROR_VMOPS_ACCOUNT_ERROR = 531; var ERROR_VMOPS_ACCOUNT_ERROR = 531;
// Default password is MD5 hashed. Set the following variable to false to disable this. // Default password is MD5 hashed. Set the following variable to false to disable this.
var md5Hashed = false; var md5Hashed = true;
var md5HashedLogin = false;
//page size for API call (e.g."listXXXXXXX&pagesize=N" ) //page size for API call (e.g."listXXXXXXX&pagesize=N" )
var pageSize = 50; var pageSize = 50;