Skip to content

Commit d708304

Browse files
author
Davies Liu
committed
fix #111: shouldRetainParam() should handle 'code'
shouldRetainParam function doesn't work as advertised in a comment, return false if given 'code', 'code=', or 'code=a'
1 parent 7ea7c6b commit d708304

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/base_facebook.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1258,7 +1258,8 @@ protected function getCurrentUrl() {
12581258
*/
12591259
protected function shouldRetainParam($param) {
12601260
foreach (self::$DROP_QUERY_PARAMS as $drop_query_param) {
1261-
if (strpos($param, $drop_query_param.'=') === 0) {
1261+
if ($param === $drop_query_param ||
1262+
strpos($param, $drop_query_param.'=') === 0) {
12621263
return false;
12631264
}
12641265
}

0 commit comments

Comments
 (0)