mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-13 01:15:47 +01:00
image upload sends the csrf token now
This commit is contained in:
@@ -17,6 +17,9 @@ $(document).ready(function() {
|
|||||||
error('select an image to upload!');
|
error('select an image to upload!');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$(this).find('#imageUploadCsrf').val($('#csrf_token').val());
|
||||||
|
|
||||||
|
|
||||||
$(this).ajaxSubmit({
|
$(this).ajaxSubmit({
|
||||||
|
|
||||||
|
|||||||
@@ -42,6 +42,7 @@
|
|||||||
|
|
||||||
<form id="uploadForm" action="/users/uploadpicture" method="post" enctype="multipart/form-data">
|
<form id="uploadForm" action="/users/uploadpicture" method="post" enctype="multipart/form-data">
|
||||||
<input id="userPhotoInput" type="file" name="userPhoto" >
|
<input id="userPhotoInput" type="file" name="userPhoto" >
|
||||||
|
<input id="imageUploadCsrf" type="hidden" name="_csrf" value="">
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<div id="upload-progress-box" class="progress progress-striped active hide">
|
<div id="upload-progress-box" class="progress progress-striped active hide">
|
||||||
|
|||||||
Reference in New Issue
Block a user