nokonoko / Pomf

Simple file uploading and sharing, source for the now shut down site Pomf.se
MIT License
463 stars 98 forks source link

mt_rand() rand issue #2

Closed AlleSoke1 closed 10 years ago

AlleSoke1 commented 10 years ago

In upload.php , randomizing filename does not work if max < min , corrected it and works fine.

Error log above. 2014/01/03 23:37:36 [error] 1554#0: *251 FastCGI sent in stderr: "PHP message: PHP Warning: mt_rand(): max(97) is smaller than min(122) in /www/file/upload.php on line 54

Tested with nginx 1.4.4 / php-fpm and php 5.5.7

nokonoko commented 10 years ago

What did you correct it to, could you send a gist or something, not really in a mental state to understand anything right now and the random filename function seems to work.

NuckChorris will hopefully take care of it, thanks for letting us know.

NuckChorris commented 10 years ago

I... think I already fixed this bug before.

And a quick check on the server verifies this is true! Haha, I guess I forgot to commit that, I'll do that shortly~

nokonoko commented 10 years ago

Good, then I'll deploy it to the server, seems like the fix is already on the server tho but has not been pushed to the Github.

nokonoko commented 10 years ago

There, updated the code on Github and should work now. #GhettoStyle

Closing since it's fixed now, hopefully.