Skip to content

Commit

Permalink
[SS-2015-029] FIX Add CSFR protection to tree reorganise
Browse files Browse the repository at this point in the history
  • Loading branch information
dhensby committed Apr 18, 2016
1 parent 1f820b0 commit 3c0f2e8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions admin/code/LeftAndMain.php
Expand Up @@ -1046,6 +1046,9 @@ public function delete($data, $form) {
* @return SS_HTTPResponse JSON string with a
*/
public function savetreenode($request) {
if (!SecurityToken::inst()->checkRequest($request)) {
return $this->httpError(400);
}
if (!Permission::check('SITETREE_REORGANISE') && !Permission::check('ADMIN')) {
$this->response->setStatusCode(
403,
Expand Down
5 changes: 4 additions & 1 deletion admin/javascript/LeftAndMain.Tree.js
Expand Up @@ -97,7 +97,10 @@
});

$.ajax({
'url': self.data('urlSavetreenode'),
'url': $.path.addSearchParams(
self.data('urlSavetreenode'),
self.data('extraParams')
),
'type': 'POST',
'data': {
ID: nodeID,
Expand Down

0 comments on commit 3c0f2e8

Please sign in to comment.