mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #10456 from creative-commoners/pulls/5/rescue-master-remove-unsafe-queryparams
API Rescue Master Branch PR: Remove isDev / isTest querystring arguments
This commit is contained in:
commit
4a3b6d951b
@ -257,12 +257,6 @@ abstract class BaseKernel implements Kernel
|
||||
return $this->enviroment;
|
||||
}
|
||||
|
||||
// Check saved session
|
||||
$env = $this->sessionEnvironment();
|
||||
if ($env) {
|
||||
return $env;
|
||||
}
|
||||
|
||||
// Check getenv
|
||||
if ($env = Environment::getEnv('SS_ENVIRONMENT_TYPE')) {
|
||||
return $env;
|
||||
@ -271,23 +265,6 @@ abstract class BaseKernel implements Kernel
|
||||
return self::LIVE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check or update any temporary environment specified in the session.
|
||||
*
|
||||
* @return null|string
|
||||
*
|
||||
* @deprecated 5.0 Use Director::get_session_environment_type() instead
|
||||
*/
|
||||
protected function sessionEnvironment()
|
||||
{
|
||||
if (!$this->booted) {
|
||||
// session is not initialyzed yet, neither is manifest
|
||||
return null;
|
||||
}
|
||||
|
||||
return Director::get_session_environment_type();
|
||||
}
|
||||
|
||||
abstract public function boot($flush = false);
|
||||
|
||||
abstract public function isFlushed();
|
||||
|
@ -53,10 +53,7 @@ class ErrorControlChainMiddleware implements HTTPMiddleware
|
||||
{
|
||||
$chain = new ConfirmationTokenChain();
|
||||
$chain->pushToken(new URLConfirmationToken('dev/build', $request));
|
||||
|
||||
foreach (['isTest', 'isDev', 'flush'] as $parameter) {
|
||||
$chain->pushToken(new ParameterConfirmationToken($parameter, $request));
|
||||
}
|
||||
$chain->pushToken(new ParameterConfirmationToken('flush', $request));
|
||||
|
||||
return $chain;
|
||||
}
|
||||
|
@ -129,7 +129,6 @@ class ParameterConfirmationToken extends AbstractConfirmationToken
|
||||
|
||||
public function suppress()
|
||||
{
|
||||
unset($_GET[$this->parameterName]);
|
||||
$this->request->offsetUnset($this->parameterName);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user