mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-12 17:05:51 +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!');
|
||||
return false;
|
||||
}
|
||||
|
||||
$(this).find('#imageUploadCsrf').val($('#csrf_token').val());
|
||||
|
||||
|
||||
$(this).ajaxSubmit({
|
||||
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
|
||||
<form id="uploadForm" action="/users/uploadpicture" method="post" enctype="multipart/form-data">
|
||||
<input id="userPhotoInput" type="file" name="userPhoto" >
|
||||
<input id="imageUploadCsrf" type="hidden" name="_csrf" value="">
|
||||
</form>
|
||||
|
||||
<div id="upload-progress-box" class="progress progress-striped active hide">
|
||||
|
||||
Reference in New Issue
Block a user