random token re-used in subsequent requests

Vincent Veyron <[email protected]>
Newsgroups gmane.comp.apache.mod-perl
Message-ID <[email protected]>
Hi,

I use the code shown here :

http://pastebin.com/6YL9FWGX

in a mod_perl handler.

At line 57, $args->{_token_id} ||= ... generates a random token that is used to uniquely identify the request (users may reload the URL in two different windows), and added to the request's arguments. 

Out of five different servers, the code works fine on four machines, and a different token is generated every time the page is loaded or re-loaded. On one server however, a previous token is being re-used. The servers are not identical, but all run the same up-to-date Debian Jessie, using the same distribution packages of Apache and mod_perl

Below is what is printed in the error log of the faulty system by Data::Dumper; as you can see, on the third iteration, the first token is reused.

Before : $VAR1 = {
          'id_entry' => '16007',
          'mois' => 0,
          'open_journal' => 'Fournisseurs'
        };
After : $VAR1 = {
          '_token_id' => 'Gh63Y2J9YYaNuReIsI8JAEj9oCY39oiy', <------------------------------------- token 1
          'id_entry' => '16007',
          'mois' => 0,
          'open_journal' => 'Fournisseurs'
        };
Before : $VAR1 = {
          'id_entry' => '16007',
          'open_journal' => 'Fournisseurs',
          'mois' => 0
        };
After : $VAR1 = {
          'open_journal' => 'Fournisseurs',
          'mois' => 0,
          'id_entry' => '16007',
          '_token_id' => 'EHL2mm1LvmFIgPeYEFYO8dKt71lWiwkP' <------------------------------------- token 2
        };
Before : $VAR1 = {
          'mois' => 0,
          'open_journal' => 'Fournisseurs',
          'id_entry' => '16257'
        };
After : $VAR1 = {
          'open_journal' => 'Fournisseurs',
          'mois' => 0,
          'id_entry' => '16257',
          '_token_id' => 'Gh63Y2J9YYaNuReIsI8JAEj9oCY39oiy' <------------------------------------- token 1 again
        };

What can I do to find the cause of this misbehaviour?


-- 
					Bien à vous, Vincent Veyron

https://marica.fr/
Gestion des sinistres assurance et des dossiers juridiques
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.