Item14179: Foswiki 1.1.x: Crash in Configure::UIs::CGISetup for alpha versions of CGI.

pencil
Priority: Urgent
Current State: Waiting for Release
Released In: n/a
Target Release: n/a
Applies To: Engine
Component: Configure
Branches: Release01x01
Reported By: GeorgeClark
Waiting For:
Last Change By: GeorgeClark
On old perl without good version support, some comparisons for "alpha" versions of CGI result in a crash in the cgi version comparison.

This won't be fixed in a release, but creating task to document the solution.


diff --git a/core/lib/Foswiki/Configure/UIs/CGISetup.pm b/core/lib/Foswiki/Configure/UIs/CGISetup.pm
index 277dbaf..3127eaf 100644
--- a/core/lib/Foswiki/Configure/UIs/CGISetup.pm
+++ b/core/lib/Foswiki/Configure/UIs/CGISetup.pm
@@ -80,6 +80,8 @@ HERE
     }
 
     my $cgiver = $CGI::VERSION;
+    $cgiver =~ s/_.*$//;
+
     if ( "$cgiver" =~ m/^(2\.89|3\.37|3\.43|3\.47)$/ ) {
         $contents .= $this->setting( '', $this->WARN( <<HERE ) );
 You are using a version of \$CGI that is known to have issues with Foswiki.
@@ -91,7 +93,7 @@ HERE
 # CGI.pm version, on some platforms - actually need CGI 2.93 for
 # mod_perl 2.0 and CGI 2.90 for Cygwin Perl 5.8.0.  See
 # http://perl.apache.org/products/apache-modules.html#Porting_CPAN_modules_to_mod_perl_2_0_Status
-    if ( $CGI::VERSION < 2.93 ) {
+    if ( $cgiver < 2.93 ) {
         if ( $Config::Config{osname} eq 'cygwin' && $] >= 5.008 ) {
 
             # Recommend CGI.pm upgrade if using Cygwin Perl 5.8.0
-- GeorgeClark - 07 Sep 2016

 

ItemTemplate edit

Summary Foswiki 1.1.x: Crash in Configure::UIs::CGISetup for alpha versions of CGI.
ReportedBy GeorgeClark
Codebase 1.1.10, 1.1.9
SVN Range
AppliesTo Engine
Component Configure
Priority Urgent
CurrentState Waiting for Release
WaitingFor
Checkins distro:5fad4c860870
TargetRelease n/a
ReleasedIn n/a
CheckinsOnBranches Release01x01
trunkCheckins
masterCheckins
ItemBranchCheckins
Release02x01Checkins
Release02x00Checkins
Release01x01Checkins distro:5fad4c860870
Topic revision: r2 - 06 Dec 2016, GeorgeClark - This page was cached on 13 Sep 2020 - 15:30.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy