Skip to content

Add OAuth 2.0.13 to every image, including PHP 8.6 - #279

Open
csandanov wants to merge 1 commit into
masterfrom
feature/php-8.6-oauth
Open

csandanov wants to merge 1 commit into
masterfrom
feature/php-8.6-oauth

Conversation

@csandanov

Copy link
Copy Markdown
Member

Problem

The PHP 8.6 images ship without the OAuth extension, so applications that sign requests with it cannot move to PHP 8.6. PHP 8.2–8.5 images use OAuth 2.0.10, which misses three later bug-fix releases.

Cause

OAuth 2.0.10 does not build on PHP 8.6. The release that fixes this, 2.0.13, is published only on GitHub. It is not on PECL, where the images took OAuth from, or on Packagist, so PIE cannot install it either.

Solution

All images, PHP 8.2 to 8.6, now use OAuth 2.0.13, so PHP 8.6 includes it again and every version runs the same release. It is built from the release archive on GitHub, verified by checksum.

Besides PHP 8.6 support, 2.0.11–2.0.13 fix a crash when an OAuthProvider callback throws, a double free in the OAuth destructor, invalid frees and dangling pointers in multipart uploads, and two memory leaks in OAuthProvider. Multipart uploads now use cURL's MIME API instead of the deprecated curl_formadd(). See the release notes.

Changes

  • 8/install-extensions.sh: install OAuth 2.0.13 with release_for from the GitHub tag archive, and remove oauth from the PHP 8.6 unavailable list. install_release now also accepts archives whose sources are in one top-level directory, as GitHub tag archives are. It fails if it finds no config.m4. The SQL Server archives, which have their sources at the root, build as before.
  • Tests: expected OAuth version 2.0.13, and OAuth in php_modules/8.6.
  • README: OAuth 2.0.13 for every PHP version in the extension table, linked to its GitHub repository.

Part of #274.

Validation

  • Built OAuth 2.0.13 with phpize on php:8.6.0-fpm-alpine (ZTS) and on the 8.2.36, 8.3.37, 8.4.28 and 8.5.13 fpm-alpine images. It loads and reports 2.0.13 on each.
  • Built the PHP 8.6 image locally (arm64) and ran make test: all tests pass, including the module list, the 2.0.13 version check and the OAuth functional test. The build log shows the checksum verified and OAuth built from the archive's top-level directory.
  • Checked the GitHub archive checksum on two separate downloads.
  • CI builds every PHP version and variant and runs the OAuth functional test, which checks percent encoding and an HMAC-SHA1 signature.

OAuth 2.0.10 does not build on PHP 8.6, so the PHP 8.6 images shipped
without it. 2.0.13 fixes the build and is published only as a GitHub
tag: neither PECL nor Packagist has 2.0.11 or newer.

Build OAuth 2.0.13 from the checksum-verified GitHub tag archive on
every PHP version and remove it from the PHP 8.6 unavailable list.
install_release now finds config.m4 at the archive root or in one
top-level directory, as GitHub tag archives have, and fails if neither
has it. The SQL Server archives keep building from their root.

2.0.11 to 2.0.13 also fix an OAuthProvider callback crash, a double
free in the OAuth destructor, multipart upload memory errors and two
OAuthProvider leaks, and move multipart uploads to cURL's MIME API.

Part of #274.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant