openssl_error_string() returns errors left by a previous request
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
Start by tracing how PHP stores OpenSSL errors in OPENSSL_G(errors) and how request shutdown cleanup is handled in the PHP source. Reproduce the reported behavior with php-fpm configured for one static worker, then check whether clearing the queue during RSHUTDOWN makes the second request return bool(false).
索引モデルが issue の本文から書いたものです。
説明
Description
OpenSSL errors from one request show up in the next request of the same worker. PHP keeps them in OPENSSL_G(errors), which is only freed in GSHUTDOWN.
php-fpm with pm = static and pm.max_children = 1, so both requests hit one worker:
<?php
if ($_SERVER['QUERY_STRING'] === 'fail') {
@openssl_x509_read('not a certificate');
} else {
var_dump(openssl_error_string());
}
Request ?fail, then ?check.
Resulted in this output:
string(42) "error:0480006C:PEM routines::no start line"
But I expected this output instead:
bool(false)
I think the queue should be cleared in RSHUTDOWN. I can send a PR.
PHP Version
PHP 8.7.0-dev (master). The same code is in 8.3, 8.4 and 8.5.
Operating System
Ubuntu 26.04, OpenSSL 3.5.5
- 主要言語
- C
- スター
- 41.8k
- フォーク
- 8.6k
- 平均マージ
- 2日 15時間
- マージ済み PR(30日)
- 125
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
php/php-src のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
ext/openssl: 8.2.31+/8.3.31+ fail to build against OpenSSL 1.0.2 (ASN1_STRING_get0_data in xp_ssl.c)オープンExtension: openssl Status: Needs Triage
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
php/php-src#25402 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
Bug Status: Needs Triage
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
php/php-src#25397 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
SNMP accepts malformed remote ports対応中かも @somethingwithproof が 21 日前に担当しました。 オープン
難易度 2/5 半日 初心者へのやさしさ 62/100
php/php-src#25137 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Bug Status: Needs Triage
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
interpreter-core type-bug
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
ImageMagick/ImageMagick6#490 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 62/100
camera-2018/hdu-cs-wiki#647 ·
-
ZIP/ZIPS decode dereferences NULL when the cached libdeflate decompressor can't be allocated (3.5 regression)対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
AcademySoftwareFoundation/openexr#2884 ·
メンテナーはふだん 1 日以内に返信