mirror of https://github.com/apache/cloudstack.git
Fix bug 5882 - encode password before hashing it.
This commit is contained in:
parent
5a0d6206e7
commit
f5e675427b
|
|
@ -285,7 +285,7 @@ $(document).ready(function() {
|
|||
submenuContent.find("#grid_content").prepend(template.fadeIn("slow"));
|
||||
|
||||
var username = thisDialog.find("#add_user_username").val();
|
||||
var password = $.md5(thisDialog.find("#add_user_password").val());
|
||||
var password = $.md5(encodeURIComponent(thisDialog.find("#add_user_password").val()));
|
||||
var email = thisDialog.find("#add_user_email").val();
|
||||
if(email == "")
|
||||
email = username;
|
||||
|
|
@ -313,7 +313,7 @@ $(document).ready(function() {
|
|||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
data: "command=createUser&username="+encodeURIComponent(username)+"&password="+encodeURIComponent(password)+"&email="+encodeURIComponent(email)+"&firstname="+encodeURIComponent(firstname)+"&lastname="+encodeURIComponent(lastname)+"&account="+account+"&accounttype="+accountType+"&domainid="+domainId+moreCriteria.join("")+"&response=json",
|
||||
data: "command=createUser&username="+encodeURIComponent(username)+"&password="+password+"&email="+encodeURIComponent(email)+"&firstname="+encodeURIComponent(firstname)+"&lastname="+encodeURIComponent(lastname)+"&account="+account+"&accounttype="+accountType+"&domainid="+domainId+moreCriteria.join("")+"&response=json",
|
||||
dataType: "json",
|
||||
async: false,
|
||||
success: function(json) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue