added csrf to ajax calls

This commit is contained in:
Baris Usakli
2013-06-20 16:29:44 -04:00
parent a32103efbe
commit 523b787e69
8 changed files with 31 additions and 23 deletions

View File

@@ -80,7 +80,8 @@ $(document).ready(function() {
function changeUserPicture(type) {
var userData = {
uid: $('#inputUID').val(),
type: type
type: type,
_csrf:$('#csrf_token').val()
};
$.post('/users/changepicture',
@@ -103,6 +104,7 @@ $(document).ready(function() {
birthday:$('#inputBirthday').val(),
location:$('#inputLocation').val(),
signature:$('#inputSignature').val(),
_csrf:$('#csrf_token').val()
};
$.post('/users/doedit',