OpenSSL config path does not respect open_basedir restriction
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- C
- Estrellas
- 40.4k
- Forks
- 8.1k
- Merge medio
- 2 d 13 h
- PR fusionados (30 d)
- 96
Descripción
Description
Currently the config in options passed to some functions is not checked if it is inside open_basedir restriction. This should be probably fixed just in master as it is not usually a big issue considering that the config is basically read only and some user flows might have relied on it being in the system path so we don't want to break them in a patch release. However we should still confirm to the open_basedir rules and prohibit it in master branch. One thing to note that this should not be applied on the default path as it would be too big break for not a big gain.
The following code:
<?php
// cert path (existing cert)
$config= "$file_path/openssl.cnf";
ini_set('open_basedir', "$file_path/config");
$pkey= openssl_pkey_new([
'config' => $config
]);
var_dump($pkey);
Resulted in this output:
object...
But I expected this output instead:
possibly warning
bool(false)
PHP Version
Any
Operating System
Any
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Comienza en el punto de entrada openssl_pkey_new() y sigue cómo se gestiona su opción explícita 'config' bajo open_basedir. Verifica que se rechace una ruta de configuración fuera de la restricción, mientras que la ruta predeterminada permanezca sin cambios, y añade después cobertura de regresión para ambos casos.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- c, php
- Área
- security
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 30/100