/[smeserver]/rpms/e-smith-formmagick/sme10/e-smith-formmagick-2.6.0-bz10902-csrf-timeout.patch
ViewVC logotype

Annotation of /rpms/e-smith-formmagick/sme10/e-smith-formmagick-2.6.0-bz10902-csrf-timeout.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (hide annotations) (download)
Sat Mar 6 06:01:00 2021 UTC (3 years, 8 months ago) by jpp
Branch: MAIN
CVS Tags: e-smith-formmagick-2_6_0-6_el7_sme, e-smith-formmagick-2_6_0-5_el7_sme, HEAD
Changes since 1.1: +5 -3 lines
* Sat Mar 06 2021 Jean-Philipe Pialasse <tests@pialasse.com> 2.6.0-5.sme
- increase CSRF timeout from 120s to 180s [SME: 10902]
  added property httpd-admin{csrfTimeout} in second to override
  added hability to ovarride the Timeout from panel to panel

1 jpp 1.1 diff -Nur e-smith-formmagick-2.6.0.old/root/usr/share/perl5/vendor_perl/esmith/FormMagick.pm e-smith-formmagick-2.6.0/root/usr/share/perl5/vendor_perl/esmith/FormMagick.pm
2     --- e-smith-formmagick-2.6.0.old/root/usr/share/perl5/vendor_perl/esmith/FormMagick.pm 2021-03-06 00:48:19.688000000 -0500
3 jpp 1.2 +++ e-smith-formmagick-2.6.0/root/usr/share/perl5/vendor_perl/esmith/FormMagick.pm 2021-03-06 01:00:32.343000000 -0500
4 jpp 1.1 @@ -20,6 +20,7 @@
5     use esmith::I18N;
6     use POSIX qw(strftime);
7     # use I18N::LangTags qw(super_languages);
8     +use esmith::ConfigDB;
9    
10     @ISA = qw(CGI::FormMagick Exporter);
11    
12     @@ -38,6 +39,8 @@
13     _read_lexicons
14     );
15    
16     +our $configdb = esmith::ConfigDB->open_ro();
17     +
18     =begin _private
19    
20     The import method is doing some tricky stuff to make sure that when
21 jpp 1.2 @@ -216,6 +219,9 @@
22 jpp 1.1 $data = <main::DATA>;
23     }
24    
25     + my $csrfdelay = $args{csrfdelay} || $configdb->get('httpd-admin')->prop('csrfTimeout') || '180';
26 jpp 1.2 + $csrfdelay = ($csrfdelay =~ /\D/ )? 180 : $csrfdelay;
27     + $csrfdelay = ( $csrfdelay > 500) ? 500 : $csrfdelay;
28 jpp 1.1 my $sessiondir = "/var/cache/e-smith/formmagick/sessions";
29     my $charset = $args{charset} || 'UTF-8';
30    
31 jpp 1.2 @@ -225,7 +231,8 @@
32 jpp 1.1 charset => $charset,
33     sessiondir => $sessiondir,
34     debug => $args{debug},
35     - csrf => 1
36     + csrf => 1,
37     + csrfdelay => $csrfdelay
38     );
39    
40     my $fallback = "en-us";

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed