perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vincent Veyron <vv.li...@wanadoo.fr>
Subject random token re-used in subsequent requests
Date Mon, 16 May 2016 14:38:18 GMT
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


Mime
View raw message