r/programming • u/sarciszewski • Nov 25 '15
Don't use the OWASP PHPSec Crypto Library
https://gist.github.com/paragonie-scott/91893fdb18ee4d1a1b95
38
Upvotes
r/programming • u/sarciszewski • Nov 25 '15
View all comments
Show parent comment
2
u/terrkerr Nov 25 '15
For obvious reasons I'm not just going to give you a demonstration URL on a live website.
The point really remains though: whether or not I or you or anybody in particular has or hasn't seen any examples recently the fact is that it's really easy to see how you can write one in PHP without intending to in normal usage of the language.
Sure, in theory I can write a Python script that has such a vulnerability. In practice I'm much less likely to do it in error because I'm just trying to include the right HTML snippets in my response or include the right class in some file. Python doesn't do the echo-by-default so you get some system to include HTML snippets in a more reasonable way, and if I want a module I get a module. I don't need to pretend I have a module system by contextually loading this file or that one based on some request parameter, I can just have an import statement for each and it's probably not a big deal to do the mass import.
And even if it is a problem to do
I can write a contextual import statement that you'll be much harder pressed to turn into echoing out arbitrary files' contents.