Skip to content
Snippets Groups Projects
Commit 2bc935fa authored by Tim van Dijen's avatar Tim van Dijen
Browse files
parent 9ffda40d
No related branches found
No related tags found
No related merge requests found
......@@ -404,7 +404,7 @@ class XML
*/
public static function isValid($xml, string $schema)
{
if (!is_string($xml) && ! ($xml instanceof DOMDocument)) {
if (!is_string($xml) && !($xml instanceof DOMDocument)) {
throw new \InvalidArgumentException('Invalid input parameters.');
}
......
......@@ -76,7 +76,10 @@ class SessionHandlerPHPTest extends ClearStateTestCase
$headers = xdebug_get_headers();
$this->assertStringContainsString('SimpleSAML=1;', $headers[0]);
$this->assertMatchesRegularExpression('/\b[Ee]xpires=([Mm]on|[Tt]ue|[Ww]ed|[Tt]hu|[Ff]ri|[Ss]at|[Ss]un)/', $headers[0]);
$this->assertMatchesRegularExpression(
'/\b[Ee]xpires=([Mm]on|[Tt]ue|[Ww]ed|[Tt]hu|[Ff]ri|[Ss]at|[Ss]un)/',
$headers[0]
);
$this->assertMatchesRegularExpression('/\b[Pp]ath=\/ourPath(;|$)/', $headers[0]);
$this->assertMatchesRegularExpression('/\b[Dd]omain=example.com(;|$)/', $headers[0]);
$this->assertMatchesRegularExpression('/\b[Ss]ecure(;|$)/', $headers[0]);
......
......@@ -488,7 +488,10 @@ class HTTPTest extends ClearStateTestCase
$this->assertMatchesRegularExpression('/\b[Hh]ttp[Oo]nly(;|$)/', $headers[0]);
$this->assertStringContainsString('RawCookie=value%20;', $headers[1]);
$this->assertMatchesRegularExpression('/\b[Ee]xpires=([Mm]on|[Tt]ue|[Ww]ed|[Tt]hu|[Ff]ri|[Ss]at|[Ss]un)/', $headers[1]);
$this->assertMatchesRegularExpression(
'/\b[Ee]xpires=([Mm]on|[Tt]ue|[Ww]ed|[Tt]hu|[Ff]ri|[Ss]at|[Ss]un)/',
$headers[1]
);
$this->assertMatchesRegularExpression('/\b[Pp]ath=\/ourPath(;|$)/', $headers[1]);
$this->assertMatchesRegularExpression('/\b[Dd]omain=example.com(;|$)/', $headers[1]);
$this->assertMatchesRegularExpression('/\b[Ss]ecure(;|$)/', $headers[1]);
......
......@@ -25,8 +25,13 @@ function SimpleSAML_exception_handler($exception)
set_exception_handler('SimpleSAML_exception_handler');
// log full backtrace on errors and warnings
function SimpleSAML_error_handler($errno, $errstr, $errfile = null, $errline = 0, /** @scrutinizer ignore-unused */ $errcontext = null)
{
function SimpleSAML_error_handler(
$errno,
$errstr,
$errfile = null,
$errline = 0,
/** @scrutinizer ignore-unused */ $errcontext = null
) {
if (\SimpleSAML\Logger::isErrorMasked($errno)) {
// masked error
return false;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment