NIHVIVO-762 do server-side validation as well as client-side. Do MD5 encoding on the server side and not on the client side.
This commit is contained in:
parent
8ed86720f7
commit
f8176ed041
2 changed files with 3 additions and 6 deletions
|
@ -43,7 +43,8 @@
|
|||
<tr class="editformcell">
|
||||
<td valign="bottom" colspan="2">
|
||||
<b>Confirm password</b><br/>
|
||||
<input type="password" name="passwordConfirmation" value="" size="64" maxlength="128"/>
|
||||
<input type="password" name="passwordConfirmation" value="${formValue['passwordConfirmation']}" size="64" maxlength="128"/>
|
||||
<span class="warning"><form:error name="passwordConfirmation"/></span>
|
||||
</td>
|
||||
</tr>
|
||||
</c:if>
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
|
||||
|
||||
<script language="JavaScript" type="text/javascript" src="js/md5.js"></script>
|
||||
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
<!--
|
||||
|
||||
|
@ -11,7 +9,7 @@
|
|||
return true;
|
||||
}
|
||||
|
||||
function hashPw(theForm) {
|
||||
function validatePw(theForm) {
|
||||
if (theForm.Md5password.value != theForm.passwordConfirmation.value) {
|
||||
alert("The passwords do not match.");
|
||||
theForm.Md5password.focus();
|
||||
|
@ -22,8 +20,6 @@
|
|||
theForm.Md5password.focus();
|
||||
return false;
|
||||
} else {
|
||||
theForm.Md5password.value=calcMD5(theForm.Md5password.value);
|
||||
theForm.passwordConfirmation.value=theForm.Md5password.value;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue