Skip to content
This repository has been archived by the owner on Sep 10, 2021. It is now read-only.

Commit

Permalink
Fix issue with CSRF tokens being added to database
Browse files Browse the repository at this point in the history
  • Loading branch information
Jamie Snape committed Dec 12, 2014
1 parent 3905efe commit f55f80f
Show file tree
Hide file tree
Showing 19 changed files with 37 additions and 19 deletions.
2 changes: 1 addition & 1 deletion modules/api/controllers/AdminController.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public function indexAction()
$values = $form->getValues();

foreach ($values as $key => $value) {
if ($value !== null) {
if ($key !== 'csrf' && !is_null($value)) {
$this->Setting->setConfig($key, $value, $this->moduleName);
}
}
Expand Down
2 changes: 1 addition & 1 deletion modules/archive/controllers/AdminController.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public function indexAction()
$values = $form->getValues();

foreach ($values as $key => $value) {
if ($value !== null) {
if ($key !== 'csrf' && !is_null($value)) {
$this->Setting->setConfig($key, $value, $this->moduleName);
}
}
Expand Down
2 changes: 1 addition & 1 deletion modules/cleanup/controllers/AdminController.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public function indexAction()
$values = $form->getValues();

foreach ($values as $key => $value) {
if ($value !== null) {
if ($key !== 'csrf' && !is_null($value)) {
$this->Setting->setConfig($key, $value, $this->moduleName);
}
}
Expand Down
4 changes: 3 additions & 1 deletion modules/demo/controllers/AdminController.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ public function indexAction()
$values = $form->getValues();

foreach ($values as $key => $value) {
$this->Setting->setConfig($key, $value, $this->moduleName);
if ($key !== 'csrf' && !is_null($value)) {
$this->Setting->setConfig($key, $value, $this->moduleName);
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion modules/dicomextractor/controllers/AdminController.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public function indexAction()
$values = $form->getValues();

foreach ($values as $key => $value) {
if ($value !== null) {
if ($key !== 'csrf' && !is_null($value)) {
$this->Setting->setConfig($key, $value, $this->moduleName);
}
}
Expand Down
4 changes: 3 additions & 1 deletion modules/dicomserver/controllers/AdminController.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ public function indexAction()
$values = $form->getValues();

foreach ($values as $key => $value) {
$this->Setting->setConfig($key, $value, $this->moduleName);
if ($key !== 'csrf' && !is_null($value)) {
$this->Setting->setConfig($key, $value, $this->moduleName);
}
}
}

Expand Down
4 changes: 3 additions & 1 deletion modules/googleauth/controllers/AdminController.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ public function indexAction()
$values = $form->getValues();

foreach ($values as $key => $value) {
$this->Setting->setConfig($key, $value, $this->moduleName);
if ($key !== 'csrf' && !is_null($value)) {
$this->Setting->setConfig($key, $value, $this->moduleName);
}
}
}

Expand Down
4 changes: 3 additions & 1 deletion modules/landingpage/controllers/AdminController.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ public function indexAction()
unset($values[LANDINGPAGE_TEXT_KEY]);

foreach ($values as $key => $value) {
$this->Setting->setConfig($key, $value, $this->moduleName);
if ($key !== 'csrf' && !is_null($value)) {
$this->Setting->setConfig($key, $value, $this->moduleName);
}
}
}

Expand Down
4 changes: 3 additions & 1 deletion modules/ldap/controllers/AdminController.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ public function indexAction()
$values = $form->getValues();

foreach ($values as $key => $value) {
$this->Setting->setConfig($key, $value, $this->moduleName);
if ($key !== 'csrf' && !is_null($value)) {
$this->Setting->setConfig($key, $value, $this->moduleName);
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion modules/mail/controllers/AdminController.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public function indexAction()
$values = $form->getValues();

foreach ($values as $key => $value) {
if ($value !== null) {
if ($key !== 'csrf' && !is_null($value)) {
$this->Setting->setConfig($key, $value, $this->moduleName);
}
}
Expand Down
2 changes: 1 addition & 1 deletion modules/metadataextractor/controllers/AdminController.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public function indexAction()
$values = $form->getValues();

foreach ($values as $key => $value) {
if ($value !== null) {
if ($key !== 'csrf' && !is_null($value)) {
$this->Setting->setConfig($key, $value, $this->moduleName);
}
}
Expand Down
4 changes: 3 additions & 1 deletion modules/oai/controllers/AdminController.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ public function indexAction()
$values = $form->getValues();

foreach ($values as $key => $value) {
$this->Setting->setConfig($key, $value, $this->moduleName);
if ($key !== 'csrf' && !is_null($value)) {
$this->Setting->setConfig($key, $value, $this->moduleName);
}
}
}

Expand Down
4 changes: 3 additions & 1 deletion modules/pvw/controllers/AdminController.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ public function indexAction()
$values = $form->getValues();

foreach ($values as $key => $value) {
$this->Setting->setConfig($key, $value, $this->moduleName);
if ($key !== 'csrf' && !is_null($value)) {
$this->Setting->setConfig($key, $value, $this->moduleName);
}
}
}

Expand Down
4 changes: 3 additions & 1 deletion modules/remoteprocessing/controllers/AdminController.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ public function indexAction()
$values = $form->getValues();

foreach ($values as $key => $value) {
$this->Setting->setConfig($key, $value, $this->moduleName);
if ($key !== 'csrf' && !is_null($value)) {
$this->Setting->setConfig($key, $value, $this->moduleName);
}
}
}

Expand Down
4 changes: 3 additions & 1 deletion modules/solr/controllers/AdminController.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ public function indexAction()
$values = $form->getValues();

foreach ($values as $key => $value) {
$this->Setting->setConfig($key, $value, $this->moduleName);
if ($key !== 'csrf' && !is_null($value)) {
$this->Setting->setConfig($key, $value, $this->moduleName);
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion modules/statistics/controllers/AdminController.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function indexAction()
$values = $form->getValues();

foreach ($values as $key => $value) {
if ($value !== null) {
if ($key !== 'csrf' && !is_null($value)) {
$this->Setting->setConfig($key, $value, $this->moduleName);
}
}
Expand Down
2 changes: 1 addition & 1 deletion modules/thumbnailcreator/controllers/AdminController.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public function indexAction()
$values = $form->getValues();

foreach ($values as $key => $value) {
if ($value !== null) {
if ($key !== 'csrf' && !is_null($value)) {
$this->Setting->setConfig($key, $value, $this->moduleName);
}
}
Expand Down
2 changes: 1 addition & 1 deletion modules/tracker/controllers/AdminController.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public function indexAction()
$values = $form->getValues();

foreach ($values as $key => $value) {
if ($value !== null) {
if ($key !== 'csrf' && !is_null($value)) {
$this->Setting->setConfig($key, $value, $this->moduleName);
}
}
Expand Down
2 changes: 1 addition & 1 deletion modules/visualize/controllers/AdminController.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public function indexAction()
$values = $form->getValues();

foreach ($values as $key => $value) {
if ($value !== null) {
if ($key !== 'csrf' && !is_null($value)) {
$this->Setting->setConfig($key, $value, $this->moduleName);
}
}
Expand Down

0 comments on commit f55f80f

Please sign in to comment.