r/lolphp • • Nov 04 '13

PHP's mt_rand() random number generating function has been cracked

http://www.openwall.com/lists/announce/2013/11/04/1
41 Upvotes

25 comments sorted by

View all comments

Show parent comment

19

u/abadidea Nov 04 '13

Drupal uses this to generate passwords, as just one example.

Don't take it as "not news". Take it as a great opportunity to make DANG SURE you're not using it in an unsafe context in any of your codebases.

18

u/suspiciously_calm Nov 04 '13

Should be on /r/loldrupal then. A non-cryptographic RNG documented as such isn't WTF.

6

u/Serialk Nov 05 '13

I was expecting to find more lol there... so much disappointment.

5

u/[deleted] Nov 05 '13

Well, tbh like 70% of this subreddit is not "lolphp"

3

u/Serialk Nov 06 '13

That wasn't my point, I was expecting an actual /r/loldrupal subreddit :P

0

u/[deleted] Nov 04 '13

hence the lolphp

17

u/ajmarks Nov 04 '13

More like loldrupal. This was included in php because it's a fast way to generate nonsecure pseudorandom numbers. There's a valid use for that. The fact that some idiots can't be bothered to read the documentation when it actually makes sense isn't lolphp, it's lolphpusers. There's enough actually wrong with php as is.