Enabled asynchronous XHR for retrieving salt from back-end
This commit is contained in:
parent
abc4392332
commit
568aa3352d
1 changed files with 7 additions and 2 deletions
|
@ -66,9 +66,13 @@
|
||||||
</form>
|
</form>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$("form#login").on('submit', function (event) {
|
$("form#login").on('submit', function (event) {
|
||||||
|
if ($('#digest').val()) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
var form = $(this);
|
||||||
|
event.preventDefault();
|
||||||
var name = $("#name").val();
|
var name = $("#name").val();
|
||||||
$.ajax({
|
$.ajax({
|
||||||
async: false,
|
|
||||||
url: '<% members.href salt.txt %>',
|
url: '<% members.href salt.txt %>',
|
||||||
data: "user=" + encodeURIComponent(name),
|
data: "user=" + encodeURIComponent(name),
|
||||||
dataType: "text",
|
dataType: "text",
|
||||||
|
@ -79,9 +83,9 @@
|
||||||
var token = "<% session.token %>";
|
var token = "<% session.token %>";
|
||||||
$("input:password").val("");
|
$("input:password").val("");
|
||||||
$("#digest").val($.md5($.md5(password + salt) + token));
|
$("#digest").val($.md5($.md5(password + salt) + token));
|
||||||
|
form.submit();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return true;
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -202,6 +206,7 @@
|
||||||
<tr>
|
<tr>
|
||||||
<th><% gettext Account %></th>
|
<th><% gettext Account %></th>
|
||||||
<th><% gettext Registered %></th>
|
<th><% gettext Registered %></th>
|
||||||
|
<!--th><% gettext Role %></th-->
|
||||||
<th></th>
|
<th></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|
Loading…
Add table
Reference in a new issue