File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -3785,6 +3785,9 @@ static EVP_PKEY * php_openssl_evp_from_zval(
3785
3785
3786
3786
if (Z_STRLEN_P (val ) > 7 && memcmp (Z_STRVAL_P (val ), "file://" , sizeof ("file://" ) - 1 ) == 0 ) {
3787
3787
filename = Z_STRVAL_P (val ) + (sizeof ("file://" ) - 1 );
3788
+ if (php_openssl_open_base_dir_chk (filename )) {
3789
+ TMP_CLEAN ;
3790
+ }
3788
3791
}
3789
3792
/* it's an X509 file/cert of some kind, and we need to extract the data from that */
3790
3793
if (public_key ) {
@@ -3811,9 +3814,6 @@ static EVP_PKEY * php_openssl_evp_from_zval(
3811
3814
BIO * in ;
3812
3815
3813
3816
if (filename ) {
3814
- if (php_openssl_open_base_dir_chk (filename )) {
3815
- TMP_CLEAN ;
3816
- }
3817
3817
in = BIO_new_file (filename , PHP_OPENSSL_BIO_MODE_R (PKCS7_BINARY ));
3818
3818
} else {
3819
3819
in = BIO_new_mem_buf (Z_STRVAL_P (val ), (int )Z_STRLEN_P (val ));
You can’t perform that action at this time.
0 commit comments