Skip to content
Snippets Groups Projects
Commit f4245d6d authored by Olav Morken's avatar Olav Morken
Browse files

SAML2_HTTPRedirect: Fix warning with value-less paramtere.

This patch fixes warnings from query strings like:

    http://.../endpoint.php?foo&bar=test

(Where the parameter "foo" doesn't have a value.)

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@3197 44740490-163a-0410-bde0-09ae8108e29a
parent 0523c4a1
No related branches found
No related tags found
No related merge requests found
......@@ -173,7 +173,14 @@ class SAML2_HTTPRedirect extends SAML2_Binding {
$relayState = '';
$sigAlg = '';
foreach (explode('&', $_SERVER['QUERY_STRING']) as $e) {
list($name, $value) = explode('=', $e, 2);
$tmp = explode('=', $e, 2);
$name = $tmp[0];
if (count($tmp) === 2) {
$value = $tmp[1];
} else {
/* No value for this paramter. */
$value = '';
}
$name = urldecode($name);
$data[$name] = urldecode($value);
......
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