Bug #76296 [Opn->Csd]: openssl_pkey_get_public does not respect open_basedir

From: Date: Fri, 18 May 2018 16:22:55 +0000
Subject: Bug #76296 [Opn->Csd]: openssl_pkey_get_public does not respect open_basedir
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-215298@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=76296&edit=1 ID: 76296 Updated by: bukka@php.net Reported by: erik at datahack dot se Summary: openssl_pkey_get_public does not respect open_basedir -Status: Open +Status: Closed Type: Bug Package: OpenSSL related PHP Version: Irrelevant Block user comment: N Private report: N New Comment: Automatic comment on behalf of erik@datahack.se Revision: http://git.php.net/?p=php-src.git;a=commit;h=d6bc266ba057743f18a95c1727493f161257fe41 Log: Fix bug #76296 (openssl_pkey_get_public does not respect open_basedir) Previous Comments: ------------------------------------------------------------------------ [2018-05-02 20:39:23] erik at datahack dot se Description: ------------ Not all paths check for open_basedir, move the check to make sure it's always done. https://github.com/php/php-src/pull/3230 Test script: --------------- <?php ini_set('open_basedir', '/xyz/'); var_dump(openssl_pkey_get_public("file://cert.pem")); // cert.pem must exist Expected result: ---------------- Warning: openssl_pkey_get_public(): open_basedir restriction in effect. File(cert.pem) is not within the allowed path(s): (/xyz/) in ... on line 3 bool(false) Actual result: -------------- Warning: openssl_pkey_get_public(): open_basedir restriction in effect. File(cert.pem) is not within the allowed path(s): (/xyz/) in ... on line 3 resource(4) of type (OpenSSL key) ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=76296&edit=1

« previous php.bugs (#215298) next »