Skip to content

Commit

Permalink
Merge pull request hybridauth#395 from nazar-pc/patch-1
Browse files Browse the repository at this point in the history
Do not replace $_REQUEST with something else
  • Loading branch information
StorytellerCZ committed Feb 22, 2015
2 parents b2a3670 + d24319c commit d5a1cd0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions hybridauth/Hybrid/Endpoint.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,15 @@ public static function process( $request = NULL )
if ( is_null(Hybrid_Endpoint::$request) ){
// Fix a strange behavior when some provider call back ha endpoint
// with /index.php?hauth.done={provider}?{args}...
// >here we need to recreate the $_REQUEST
// >here we need to parse $_SERVER[QUERY_STRING]
$request = $_REQUEST;
if ( strrpos( $_SERVER["QUERY_STRING"], '?' ) ) {
$_SERVER["QUERY_STRING"] = str_replace( "?", "&", $_SERVER["QUERY_STRING"] );

parse_str( $_SERVER["QUERY_STRING"], $_REQUEST );
parse_str( $_SERVER["QUERY_STRING"], $request );
}

Hybrid_Endpoint::$request = $_REQUEST;
Hybrid_Endpoint::$request = $request;
}

// If openid_policy requested, we return our policy document
Expand Down

0 comments on commit d5a1cd0

Please sign in to comment.