Re: random token re-used in subsequent requests

2016-05-18 Thread Vincent Veyron
On Wed, 18 May 2016 09:35:45 -0400 Lathan Bidwell wrote: > Is it possible that its not a problem of the rand, but a problem of the ||= > ? > > Try debugging the value before you set it. It could be a scoping issue > where the old value stays in the variable and then ||= doesn't overwrite it. >

Re: recompiling perl

2016-05-18 Thread Steven Lembark
On Tue, 10 May 2016 09:13:27 -0500 Hiram Gibbard wrote: > If I want to recompile the mod_perl module so that it points to a custom > Perl location, is it as simply as editing the following line: > #!/usr/bin/perl -w Better off using the path to locate perl: #!/bin/env perl will do this o

Re: random token re-used in subsequent requests

2016-05-18 Thread Lathan Bidwell
Is it possible that its not a problem of the rand, but a problem of the ||= ? Try debugging the value before you set it. It could be a scoping issue where the old value stays in the variable and then ||= doesn't overwrite it. *Lathan Bidwell* On Wed, May 18, 2016 at 9:08 AM, Vincent Veyron wr

Re: random token re-used in subsequent requests

2016-05-18 Thread Vincent Veyron
On Wed, 18 May 2016 09:12:17 +0200 André Warnier wrote: > Maybe you can try a BEGIN block. If I remember correctly, under mod_perl (if > you run under > "registry" to keep the compiled cgi-bin in memory), a BEGIN block should be > run only once, > when the script is first compiled (by this ch

Re: random token re-used in subsequent requests

2016-05-18 Thread André Warnier
On 18.05.2016 01:23, Vincent Veyron wrote: On Tue, 17 May 2016 20:41:28 +0200 demerphq wrote: If you fork before you call (s)rand then each child process will have their own copy of the flag, which will be false, and thus will cause srand() to be called in the subprocess properly. So now I'