Skip to content

Commit

Permalink
Revert "merged branch stloyd/feature/kernel_secret_change (PR #6598)"
Browse files Browse the repository at this point in the history
This reverts commit dbca040, reversing
changes made to 1e62588.
  • Loading branch information
fabpot committed Jan 7, 2013
1 parent c223eca commit b378964
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 18 deletions.
Expand Up @@ -51,12 +51,7 @@ public function getConfigTreeBuilder()
})
->end()
->end()
->scalarNode('secret')
->validate()
->ifTrue(function($v) { return 'ThisTokenIsNotSoSecretChangeIt' === $v; })
->thenInvalid('The "secret" parameter is currently set to the default. It is really important that you change it to something unique.')
->end()
->end()
->scalarNode('secret')->end()
->scalarNode('trust_proxy_headers')->defaultFalse()->end() // @deprecated, to be removed in 2.3
->arrayNode('trusted_proxies')
->beforeNormalization()
Expand Down
Expand Up @@ -66,7 +66,7 @@ public function testInvalidTypeTrustedProxies()
{
$processor = new Processor();
$configuration = new Configuration(array());
$processor->processConfiguration($configuration, array(array('secret' => 's3cr3t', 'trusted_proxies' => 'Not an IP address')));
$config = $processor->processConfiguration($configuration, array(array('secret' => 's3cr3t', 'trusted_proxies' => 'Not an IP address')));
}

/**
Expand All @@ -76,16 +76,6 @@ public function testInvalidValueTrustedProxies()
{
$processor = new Processor();
$configuration = new Configuration(array());
$processor->processConfiguration($configuration, array(array('secret' => 's3cr3t', 'trusted_proxies' => array('Not an IP address'))));
}

/**
* @expectedException \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException
*/
public function testDefaultSecretIsUsed()
{
$processor = new Processor();
$configuration = new Configuration(array());
$processor->processConfiguration($configuration, array(array('secret' => 'ThisTokenIsNotSoSecretChangeIt')));
$config = $processor->processConfiguration($configuration, array(array('secret' => 's3cr3t', 'trusted_proxies' => array('Not an IP address'))));
}
}

0 comments on commit b378964

Please sign in to comment.