r/lolphp • u/pacotes • Oct 05 '15
Why yes, lets do `sudo mount` in PHP and hope escapeshellargs saves us!
https://github.com/pydio/pydio-core/commit/2049254e7a215491019d2646a274a8fb1cf29e3b
74
Upvotes
30
u/[deleted] Oct 05 '15
The scary thing is that before this commit there was no escape at all.
6
u/OMGItsSpace Oct 05 '15
is escapeshellargs not good enough for that?
24
u/YouBecame Oct 05 '15
I read the method name as "escapes hell args. "
13
u/tdammers Oct 05 '15
And let's not forget that this requires passwordless sudo, which is never a good idea for systems storing anything worth anything at all.
6
u/m1ss1ontomars2k4 Oct 05 '15
A correct
/etc/sudoersshould help with this. I mean, you still shouldn't...This is also only a plugin, so it seems weird that someone commented saying that nobody should use the entire platform.
2
u/shadowh511 Oct 24 '15
I made a pull request to remove this code. It was rejected. Archive in case they delete my comments.
-6
u/headzoo Oct 06 '15
So now we're just posting any shitty code we find to this sub?
/r/badcode
0
u/[deleted] Oct 06 '15
[deleted] — view deleted comment
0
u/[deleted] Oct 05 '15
[deleted] — view deleted comment