Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[9.x] Skip unnecessary check before calling openssl_encrypt #40108

Merged
merged 1 commit into from
Dec 20, 2021

Conversation

Krisell
Copy link
Contributor

@Krisell Krisell commented Dec 20, 2021

In PHP 7.4 (before 7.4.13) openssl_encrypt emitted a warning when the $tag parameter was passed and the chosen cipher was not an AEAD cipher (AEAD ciphers set $tag by reference, other ciphers do not use this at all).

Since 7.4.13 and 8.0.0 this has been resolved and $tag is simply ignored, even if passed. This PR simplifies the code by removing the now unnecessary (but previously necessary) check.

Here's the PHP fix
php/php-src@6c6a58e

And the PHP documentation for openssl_encrypt
https://www.php.net/manual/en/function.openssl-encrypt.php

@Krisell Krisell changed the title Skip unnecessary check before calling openssl_encrypt [9.x] Skip unnecessary check before calling openssl_encrypt Dec 20, 2021
@Krisell Krisell changed the title [9.x] Skip unnecessary check before calling openssl_encrypt [9.x] Skip unnecessary check before calling openssl_encrypt Dec 20, 2021
@taylorotwell taylorotwell merged commit 703f87b into laravel:master Dec 20, 2021
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants