• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

Item7560: Security Alert CVE-2014-7237: Apache configuration file upload on TWiki on Windows server

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Engine   Urgent Closed   patch 6.0.1

Edit Form Data

Summary:
Reported By:
Codebase:
Applies To:
Component:
Priority:
Current State:
Waiting For:
Target Release:
Released In:
 

Detail

This is a follow-up on Item7558.

-- TWiki:Main/PeterThoeny - 2014-10-01

Now fixed in SVN trunk and 6.0 branch.

Patch for vanilla 6.0.0 distribution:

--- TWiki/Sandbox.pm.save1   2014-10-01 19:50:45.000000000 -0400
+++ TWiki/Sandbox.pm   2014-10-01 20:13:31.000000000 -0400
@@ -194,8 +194,11 @@
     # remember to test with IE.  
     $fileName =~ s{[\\/]+$}{};  # Get rid of trailing slash/backslash (unlikely)
     $fileName =~ s!^.*[\\/]!!;  # Get rid of directory part
+    $fileName =~ s/[\x00-\x19]//go;  # Item7560: Remove non-printable characters
 
     my $origName = $fileName;
+    # Item7560: Strip trailing dots
+    $fileName =~ s/\.*$//o;
     # Change spaces to underscore
     $fileName =~ s/ /_/go;
     # Strip dots and slashes at start
@@ -214,6 +217,11 @@
     # Append .txt to some files
     $fileName =~ s/$TWiki::cfg{UploadFilter}/$1\.txt/goi;
     
+    # Item7483, prevent a null file name
+    if ( $fileName eq '' || $fileName =~ /^\./ ) {
+        $fileName = '_' . $fileName;
+    }
+    
     # Untaint
     $fileName = untaintUnchecked($fileName);
 

-- TWiki:Main.PeterThoeny - 2014-10-02

ItemTemplate
Summary Security Alert CVE-2014-7237: Apache configuration file upload on TWiki on Windows server
ReportedBy TWiki:Main.PeterThoeny
Codebase ~twiki4, 6.0.0
SVN Range TWiki-6.0.1-trunk, Mon, 29 Sep 2014, build 28107
AppliesTo Engine
Component

Priority Urgent
CurrentState Closed
WaitingFor

Checkins TWikirev:28127 TWikirev:28128
TargetRelease patch
ReleasedIn 6.0.1
Edit | Attach | Watch | Print version | History: r7 < r6 < r5 < r4 < r3 | Backlinks | Raw View |  Raw edit | More topic actions
Topic revision: r7 - 2014-10-11 - PeterThoeny
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback