Skip to content

Commit

Permalink
Fixed issue: Potential security issue in kcfinder fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
lacrioque committed Aug 22, 2018
1 parent bfa334c commit ff4c14d
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions third_party/kcfinder/core/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,12 @@


// CMS INTEGRATION
if (isset($_GET['cms']) &&
(basename($_GET['cms']) == $_GET['cms']) &&
is_file("integration/{$_GET['cms']}.php")
)
require "integration/{$_GET['cms']}.php";
// Possible files -> drupal, BolmerCMS
if(isset($_GET['cms']) && (basename($cmsFile) == $cmsFile) && preg_match("/drupal|BolmerCMS/", $_GET['cms'])){
$cmsFile = basename($_GET['cms']);
if (is_file("integration/{$cmsFile}.php") )
require "integration/{$cmsFile}.php";
}


// REGISTER AUTOLOAD FUNCTION
Expand Down

1 comment on commit ff4c14d

@Shnoulle
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

? basename($_GET['cms']) == $_GET['cms'] allow only valid php file in the directory, then no real security issue, no ?

Please sign in to comment.