project-satisfy / satisfy

Satis composer repository manager with a Web UI

Home Page:http://ludofleury.github.io/satisfy/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Webhook open_basedir restriction /dev/null

rabauss opened this issue · comments

The undocumented feature of webhooks for gitlab is quite nice.
Allthough we had some trouble with open_basedir restriction:

Warning: fopen(): open_basedir restriction in effect. File(/dev/null) is not within the allowed path(s)

In a nutshell, I could not figure out where the output is redirected to dev/null. Maybe someone can help and optimize that, so the php.ini does not have to be updated.

The exception above is thrown in AbstractWebhook -> getResponse. Unfortunately the exception is not returned in https://github.com/ludofleury/satisfy/blob/bc3ecffe447927582f1b5609a6541fc78e305713/src/Playbloom/Satisfy/Webhook/AbstractWebhook.php#L44
This could get implemented like this:

 throw new ServiceUnavailableHttpException(null, $exception->getMessage());

@rabauss are You sure there is no /dev/null in Your satis configurations?

I could not find any setting to dev/null

I see, UnixPipes tries to open blackhole file as command output, when it is disabled.
https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Process/Pipes/UnixPipes.php#L49
@rabauss please check latest master, should be fixed.

Thanks, for the fix!
For our scenario with our own gitlab it's working.