Skip to content

Commit

Permalink
Disable CSRF protection on /import page (fix #341)
Browse files Browse the repository at this point in the history
  • Loading branch information
lGuillaume124 committed Aug 27, 2018
1 parent 9519574 commit 71e062e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/Controller/SongsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ class SongsController extends AppController {

public function beforeFilter() {
parent::beforeFilter();

if ($this->request->params['action'] == 'import' && $this->request->is('post')) {
$this->Security->validatePost = false;
$this->Security->csrfCheck = false;
}
}

/**
Expand Down

0 comments on commit 71e062e

Please sign in to comment.