From 216e3496d559b2b932f52bc31967177e04fcf189 Mon Sep 17 00:00:00 2001 From: janhartigan Date: Tue, 3 Mar 2015 16:01:33 -0800 Subject: [PATCH 1/2] fixing csrf token mismatches for some requests --- changelog.md | 2 ++ public/js/admin.js | 7 +++++++ public/js/settings.js | 7 +++++++ 3 files changed, 16 insertions(+) diff --git a/changelog.md b/changelog.md index a4faf4033..c75f175cd 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,7 @@ ## Changelog +- Bugfix: Fixing csrf token mismatches for some requests + ### 5.0.0 - Upgraded to Laravel 5 - New translations (az) diff --git a/public/js/admin.js b/public/js/admin.js index d2f806efd..e911b26b1 100644 --- a/public/js/admin.js +++ b/public/js/admin.js @@ -5,6 +5,13 @@ return this.init(); }; + //setting up csrf token + $.ajaxSetup({ + headers: { + 'X-CSRF-TOKEN': window.csrf + } + }); + admin.prototype = { //properties diff --git a/public/js/settings.js b/public/js/settings.js index f91a3d2bb..4567700f5 100644 --- a/public/js/settings.js +++ b/public/js/settings.js @@ -5,6 +5,13 @@ return this.init(); }; + //setting up csrf token + $.ajaxSetup({ + headers: { + 'X-CSRF-TOKEN': window.csrf + } + }); + admin.prototype = { //properties From 7fff6bb2582eba4b94e35467560b2cdadbe2c36a Mon Sep 17 00:00:00 2001 From: janhartigan Date: Tue, 3 Mar 2015 16:02:19 -0800 Subject: [PATCH 2/2] version bump to 5.0.1 --- changelog.md | 1 + readme.md | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/changelog.md b/changelog.md index c75f175cd..e593ea830 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,6 @@ ## Changelog +### 5.0.1 - Bugfix: Fixing csrf token mismatches for some requests ### 5.0.0 diff --git a/readme.md b/readme.md index 3b870ecd6..f4573a8dd 100644 --- a/readme.md +++ b/readme.md @@ -4,7 +4,7 @@ Administrator is an administrative interface builder for [Laravel](http://larave - **Author:** Jan Hartigan - **Website:** [http://frozennode.com](http://administrator.frozennode.com/) -- **Version:** 5.0.0 +- **Version:** 5.0.1 [![Build Status](https://travis-ci.org/FrozenNode/Laravel-Administrator.png?branch=master)](https://travis-ci.org/FrozenNode/Laravel-Administrator) @@ -63,6 +63,9 @@ Administrator is released under the MIT License. See the LICENSE file for detail ## Recent Changelog +### 5.0.1 +- Bugfix: Fixing csrf token mismatches for some requests + ### 5.0.0 - Upgraded to Laravel 5 - New translations (az) \ No newline at end of file