From ed1e0e5ace4888ca82373277368e5a64e36d5b9a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 15 Sep 2023 14:31:47 +0000 Subject: [PATCH 1/2] Bump firebase/php-jwt from 3.0.0 to 6.0.0 Bumps [firebase/php-jwt](https://github.com/firebase/php-jwt) from 3.0.0 to 6.0.0. - [Release notes](https://github.com/firebase/php-jwt/releases) - [Changelog](https://github.com/firebase/php-jwt/blob/main/CHANGELOG.md) - [Commits](https://github.com/firebase/php-jwt/compare/v3.0.0...v6.0.0) --- updated-dependencies: - dependency-name: firebase/php-jwt dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- composer.json | 2 +- composer.lock | 31 +++++++++++++++++++------------ 2 files changed, 20 insertions(+), 13 deletions(-) diff --git a/composer.json b/composer.json index 0a695cb..3eeeb12 100644 --- a/composer.json +++ b/composer.json @@ -3,7 +3,7 @@ "description": "IRMA demos", "type": "project", "require": { - "firebase/php-jwt": "3.0.0" + "firebase/php-jwt": "6.0.0" }, "license": "Apache", "authors": [ diff --git a/composer.lock b/composer.lock index c4e4ede..2f1b626 100644 --- a/composer.lock +++ b/composer.lock @@ -4,25 +4,31 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "d882d949c6d6acc09fdac6f7788b0c04", + "content-hash": "625ae26a1741a79546f9dc2f1402961c", "packages": [ { "name": "firebase/php-jwt", - "version": "v3.0.0", + "version": "v6.0.0", "source": { "type": "git", "url": "https://github.com/firebase/php-jwt.git", - "reference": "fa8a06e96526eb7c0eeaa47e4f39be59d21f16e1" + "reference": "0541cba75ab108ef901985e68055a92646c73534" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/firebase/php-jwt/zipball/fa8a06e96526eb7c0eeaa47e4f39be59d21f16e1", - "reference": "fa8a06e96526eb7c0eeaa47e4f39be59d21f16e1", + "url": "https://api.github.com/repos/firebase/php-jwt/zipball/0541cba75ab108ef901985e68055a92646c73534", + "reference": "0541cba75ab108ef901985e68055a92646c73534", "shasum": "" }, "require": { "php": ">=5.3.0" }, + "require-dev": { + "phpunit/phpunit": ">=4.8 <=9" + }, + "suggest": { + "paragonie/sodium_compat": "Support EdDSA (Ed25519) signatures when libsodium is not present" + }, "type": "library", "autoload": { "psr-4": { @@ -47,11 +53,15 @@ ], "description": "A simple library to encode and decode JSON Web Tokens (JWT) in PHP. Should conform to the current spec.", "homepage": "https://github.com/firebase/php-jwt", + "keywords": [ + "jwt", + "php" + ], "support": { "issues": "https://github.com/firebase/php-jwt/issues", - "source": "https://github.com/firebase/php-jwt/tree/v3.0.0" + "source": "https://github.com/firebase/php-jwt/tree/v6.0.0" }, - "time": "2015-07-22T18:31:08+00:00" + "time": "2022-01-24T15:18:34+00:00" } ], "packages-dev": [], @@ -60,10 +70,7 @@ "stability-flags": [], "prefer-stable": false, "prefer-lowest": false, - "platform": { - "ext-json": "*", - "ext-ctype": "*" - }, + "platform": [], "platform-dev": [], - "plugin-api-version": "2.1.0" + "plugin-api-version": "2.3.0" } From 9bc9dea8a2fabd07c88b82bd9450d97ddd98eb94 Mon Sep 17 00:00:00 2001 From: Ivar Derksen Date: Fri, 15 Sep 2023 16:48:01 +0200 Subject: [PATCH 2/2] Chore: apply breaking change in JWT dependency --- get_session_request.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/get_session_request.php b/get_session_request.php index b9fb435..616b4ea 100644 --- a/get_session_request.php +++ b/get_session_request.php @@ -3,13 +3,14 @@ require_once 'config.php'; use \Firebase\JWT\JWT; +use \Firebase\JWT\Key; function get_session_request($contents) { if (JWT_ENABLED) { $jwt_pk = file_get_contents(IRMA_SERVER_PUBLICKEY); try { - $decoded = JWT::decode($contents, $jwt_pk, array('RS256')); + $decoded = JWT::decode($contents, new Key($jwt_pk, 'RS256')); } catch (Exception $e) { error_log("JWT could not be parsed: " . $e); header("HTTP/1.0 403 Forbidden");