Fix bug 5882 - encode password before hashing it.

This commit is contained in:
unknown 2010-09-01 14:22:34 -07:00 committed by Jessica Wang
parent 5a0d6206e7
commit f5e675427b
1 changed files with 2 additions and 2 deletions

View File

@ -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) {