Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move csrf token into formData for richTextModule (in bureaucracy lib), v3.0.3 #712

Merged
merged 2 commits into from
Apr 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions dist/PublicLab.Editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -22208,7 +22208,7 @@ module.exports = function(textarea, _editor, _module) {
fieldKey: "image[photo]",

// additional form fields
formData: {nid: null},
formData: {nid: null, authenticity_token: _module.options.token},

// xhr upload options like CSRF token
xhrOptions: {
Expand Down Expand Up @@ -22242,7 +22242,7 @@ module.exports = function(textarea, _editor, _module) {
fieldKey: "image[photo]",

// additional form fields
formData: {nid: null},
formData: {nid: null, authenticity_token: _module.options.token},

// xhr upload options like CSRF token
xhrOptions: {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "publiclab-editor",
"version": "3.0.2",
"version": "3.0.3",
"description": "PublicLab.Editor is a general purpose, JavaScript/Bootstrap UI framework for rich text posting, which provides an author-friendly, minimal, mobile/desktop (fluid) interface for creating blog-like content, designed for PublicLab.org",
"main": "dist/PublicLab.Editor.js",
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions src/adapters/PublicLab.Woofmark.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ module.exports = function(textarea, _editor, _module) {
fieldKey: "image[photo]",

// additional form fields
formData: {nid: null},
formData: {nid: null, authenticity_token: _module.options.token},

// xhr upload options like CSRF token
xhrOptions: {
Expand Down Expand Up @@ -99,7 +99,7 @@ module.exports = function(textarea, _editor, _module) {
fieldKey: "image[photo]",

// additional form fields
formData: {nid: null},
formData: {nid: null, authenticity_token: _module.options.token},

// xhr upload options like CSRF token
xhrOptions: {
Expand Down