You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After a fresh install I do have CSRF protection out of the box, which is very cool. At the moment I am still in development mode and I do not want it to be active yet, as it blocks some POST/DELETE requests.
In the config file for the CRSF there is the setting //'enabled' => true, which is commented out and by that it should not be active. Trying to set it to 'enabled' => false, does not change that.
I think the problem comes from the method loadApplicationConfig(). This part here enables the CRSF config by default if sessions are activated:
If enabled is set to false it still seems to ignore that block. I think the problem is the operator precedence. !== is evaluated before ??, so with a setting of enabled=false it evaluates to false ?? true which is always false.
With that it still does not automatically disable CRSF if the enabled is commented out in the config like //'enabled' => true,, but at least it can be deactivated by setting it to false.
The text was updated successfully, but these errors were encountered:
After a fresh install I do have CSRF protection out of the box, which is very cool. At the moment I am still in development mode and I do not want it to be active yet, as it blocks some POST/DELETE requests.
In the config file for the CRSF there is the setting
//'enabled' => true,
which is commented out and by that it should not be active. Trying to set it to'enabled' => false,
does not change that.I think the problem comes from the method
loadApplicationConfig()
. This part here enables the CRSF config by default if sessions are activated:If
enabled
is not set at all in in the CRSF config, then this part does not change anything and CSRF remains activated:If
enabled
is set tofalse
it still seems to ignore that block. I think the problem is the operator precedence.!==
is evaluated before??
, so with a setting ofenabled=false
it evaluates tofalse ?? true
which is alwaysfalse
.That line should be changed to:
With that it still does not automatically disable CRSF if the
enabled
is commented out in the config like//'enabled' => true,
, but at least it can be deactivated by setting it tofalse
.The text was updated successfully, but these errors were encountered: