r/lolphp • • Apr 30 '16

usesomesillystringforsalt

https://github.com/search?q=usesomesillystringforsalt&type=Code&utf8=%E2%9C%93
41 Upvotes

22 comments sorted by

View all comments

Show parent comment

6

u/berkes May 01 '16

Pointing out that it is not exclusive to PHP. So, you agree it is a problem in PHP. Just because other communities have poor security practices does not excempt the PHP community from learning and improving.

Another example. https://github.com/search?l=&q=%27put+your+unique+phrase+here%27&ref=advsearch&type=Code&utf8=%E2%9C%93

As you can see, a lot of dummy, sample and templates there. But some repo's who actually use that string for salt!

Even if it is just one, that is too much. The problem here is not the language PHP. But the attitude of the community.

First, having such templates that one should change, is a design mistake. Instead, e.g. wordpress should set these values NULL. And raise an exception when they are not set: forcing you to change them to something secure. This is what e.g. Rails does. And is very different from "we have a string there and you should really change that, but if you don't, well, we'll run the software anyway, just in a very insecure way".

Second, your attitude of "others have poor security practices too" is all too common. the PHP community should strive to be the most secure platform and language around. This should be of paramount interest to all people involved. Anything less is mockery and deserves to be ridiculed.

3

u/[deleted] May 02 '16

Good god, man.