YunoHost-Apps / zerobin_ynh

PrivateBin package for YunoHost
https://privatebin.info
GNU General Public License v3.0
11 stars 12 forks source link

[fix] add secure rm #16

Closed magikcypress closed 7 years ago

magikcypress commented 7 years ago

Adding a secure rm function to avoid doing a brutal rm

JimboJoe commented 7 years ago

Still some problems on file rights...

`2017/04/23 06:41:20 [error] 25532#0: *472 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught exception 'Exception' with message 'unable to write to file data/.htaccess' in /var/www/zerobin/lib/Persistence/AbstractPersistence.php:104 Stack trace:

0 /var/www/zerobin/lib/Persistence/AbstractPersistence.php(73): PrivateBin\Persistence\AbstractPersistence::_initialize()

1 /var/www/zerobin/lib/Persistence/TrafficLimiter.php(106): PrivateBin\Persistence\AbstractPersistence::_exists('traffic_limiter...')

2 /var/www/zerobin/lib/PrivateBin.php(223): PrivateBin\Persistence\TrafficLimiter::canPass()

3 /var/www/zerobin/lib/PrivateBin.php(135): PrivateBin\PrivateBin->_create()

4 /var/www/zerobin/index.php(18): PrivateBin\PrivateBin->__construct()

5 {main}

thrown in /var/www/zerobin/lib/Persistence/AbstractPersistence.php on line 104" while reading response header from upstream, client: 10.0.2.2, server: ortest.noho.st, request: "POST /zerobin/ HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "ortest.noho.st" `

JimboJoe commented 7 years ago

@magikcypress if I understand correctly, we're waiting for this to get finalized and merged in PrivateBin, right?

magikcypress commented 7 years ago

Currently, I have to work on a patch on PrivateBin, but I don't have time to make it. This patch does not write the .htaccess for Nginx. But, from what I understand @JimboJoe problem is not related to this .htaccess problem. This is a problem between php5-fpm and the dedicated user, i think more research should be done.

JimboJoe commented 7 years ago

I made some changes so that package_check results look much better now. That still needs some extensive testing before we can release it and create the privatebin_ynh package... Some volunteers? :-) (I don't use that app myself)

magikcypress commented 7 years ago

I worked a little bit ;)

https://github.com/magikcypress/PrivateBin/commit/f23b1222dd8e296858a45384185c2175a0aaf7cd

maniackcrudelis commented 7 years ago

Restore script failed ! You should remove this useless lines https://github.com/YunoHost-Apps/zerobin_ynh/blob/devel/scripts/restore#L76-L78

alexAubin commented 7 years ago

Bumping while passing by ? This PR is needed for https://github.com/YunoHost/apps/pull/212

JimboJoe commented 7 years ago

I think this PR should be merged right now and the decision process applied to the whole application...

maniackcrudelis commented 7 years ago

If the work on this app is over. I agree. And we report the decision process on the PR for the app list.

alexAubin commented 7 years ago

magikcypress commented 7 years ago

I agree with everyone .. same Daft punk ;)

Rafi594 commented 7 years ago

Works fine on my server

alexAubin commented 7 years ago

(looks like there's a readme conflict to solve ;))

M5oul commented 7 years ago

In fact, I merged the other PR with a readme modifications. I resolved the conflict.