Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
- Check existence of subject when verifying JWT #474
- exp verification when verifying Logout Token claims #482
- http_build_query expects (non nullable) string as 2nd argument
- curl_close() is ineffective since PHP 8.0.0, deprecated since 8.5.0

## [1.0.1] - 2024-09-13

Expand Down
6 changes: 4 additions & 2 deletions src/OpenIDConnectClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -972,7 +972,7 @@ public function requestTokenExchange(string $subjectToken, string $subjectTokenT
}

// Convert token params to string format
$post_params = http_build_query($post_data, null, '&', $this->encType);
$post_params = http_build_query($post_data, '', '&', $this->encType);

return json_decode($this->fetchURL($token_endpoint, $post_params, $headers), false);
}
Expand Down Expand Up @@ -1446,7 +1446,9 @@ protected function fetchURL(string $url, ?string $post_body = null, array $heade
}

// Close the cURL resource, and free system resources
curl_close($ch);
if (PHP_VERSION_ID < 80000) {
curl_close($ch);
}

return $output;
}
Expand Down