[MediaWiki-commits] [Gerrit] mediawiki...BlueSpiceFoundation[master]: BSFoundation: Added missing wfProfileOut calls in FileSystem...

2017-09-14 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/376476 )

Change subject: BSFoundation: Added missing wfProfileOut calls in 
FileSystemHelper
..


BSFoundation: Added missing wfProfileOut calls in FileSystemHelper

Change-Id: Ic34375c7e74b46491705b76130a5537372b41b4c
---
M includes/utility/FileSystemHelper.class.php
1 file changed, 12 insertions(+), 4 deletions(-)

Approvals:
  Pwirth: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/utility/FileSystemHelper.class.php 
b/includes/utility/FileSystemHelper.class.php
index 4e0cb4b..97f73d2 100644
--- a/includes/utility/FileSystemHelper.class.php
+++ b/includes/utility/FileSystemHelper.class.php
@@ -9,8 +9,10 @@
 */
public static function ensureCacheDirectory($sSubDirName = '') {
wfProfileIn(__METHOD__);
-   if (self::hasTraversal($sSubDirName))
+   if ( self::hasTraversal( $sSubDirName ) ) {
+   wfProfileOut( __METHOD__ );
return Status::newFatal( wfMessage( 
"bs-filesystemhelper-has-path-traversal" ) );
+   }
if (!empty($sSubDirName) && !preg_match('#^[a-zA-Z/\\\]+#', 
$sSubDirName)) {
wfProfileOut(__METHOD__);
return Status::newFatal('Requested subdirectory of ' . 
BS_CACHE_DIR . ' contains illegal chars');
@@ -45,8 +47,10 @@
 */
public static function ensureDataDirectory($sSubDirName = '') {
wfProfileIn(__METHOD__);
-   if (self::hasTraversal($sSubDirName))
+   if ( self::hasTraversal( $sSubDirName ) ) {
+   wfProfileOut( __METHOD__ );
return Status::newFatal( wfMessage( 
"bs-filesystemhelper-has-path-traversal" ) );
+   }
if (!empty($sSubDirName) && !preg_match('#^[a-zA-Z/\\\]+#', 
$sSubDirName)) {
wfProfileOut(__METHOD__);
return Status::newFatal('Requested subdirectory of ' . 
BS_DATA_DIR . ' contains illegal chars');
@@ -84,8 +88,10 @@
public static function saveToCacheDirectory($sFileName, $data, 
$sSubDirName = '') {
wfProfileIn(__METHOD__);
$oStatus = self::ensureCacheDirectory($sSubDirName);
-   if (self::hasTraversal($sSubDirName . DS . $sFileName))
+   if ( self::hasTraversal( $sSubDirName . DS . $sFileName ) ) {
+   wfProfileOut( __METHOD__ );
return Status::newFatal( wfMessage( 
"bs-filesystemhelper-has-path-traversal" ) );
+   }
if (!$oStatus->isGood()) {
wfProfileOut(__METHOD__);
return $oStatus;
@@ -109,8 +115,10 @@
public static function saveToDataDirectory($sFileName, $data, 
$sSubDirName = '') {
wfProfileIn(__METHOD__);
$oStatus = self::ensureDataDirectory($sSubDirName);
-   if (self::hasTraversal($sSubDirName . DS . $sFileName))
+   if ( self::hasTraversal( $sSubDirName . DS . $sFileName ) ) {
+   wfProfileOut( __METHOD__ );
return Status::newFatal( wfMessage( 
"bs-filesystemhelper-has-path-traversal" ) );
+   }
if (!$oStatus->isGood()) {
wfProfileOut(__METHOD__);
return $oStatus;

-- 
To view, visit https://gerrit.wikimedia.org/r/376476
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic34375c7e74b46491705b76130a5537372b41b4c
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/BlueSpiceFoundation
Gerrit-Branch: master
Gerrit-Owner: Pwirth 
Gerrit-Reviewer: Ljonka 
Gerrit-Reviewer: Mglaser 
Gerrit-Reviewer: Pwirth 
Gerrit-Reviewer: Robert Vogel 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...BlueSpiceFoundation[master]: BSFoundation: Added missing wfProfileOut calls in FileSystem...

2017-09-06 Thread Pwirth (Code Review)
Pwirth has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/376476 )

Change subject: BSFoundation: Added missing wfProfileOut calls in 
FileSystemHelper
..

BSFoundation: Added missing wfProfileOut calls in FileSystemHelper

Change-Id: Ic34375c7e74b46491705b76130a5537372b41b4c
---
M includes/utility/FileSystemHelper.class.php
1 file changed, 12 insertions(+), 4 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceFoundation 
refs/changes/76/376476/1

diff --git a/includes/utility/FileSystemHelper.class.php 
b/includes/utility/FileSystemHelper.class.php
index d392b52..ae0bb27 100644
--- a/includes/utility/FileSystemHelper.class.php
+++ b/includes/utility/FileSystemHelper.class.php
@@ -9,8 +9,10 @@
 */
public static function ensureCacheDirectory($sSubDirName = '') {
wfProfileIn(__METHOD__);
-   if (self::hasTraversal($sSubDirName))
+   if ( self::hasTraversal( $sSubDirName ) ) {
+   wfProfileOut( __METHOD__ );
return 
Status::newFatal(wfMessage("bs-filesystemhelper-has-path-traversal"));
+   }
if (!empty($sSubDirName) && !preg_match('#^[a-zA-Z/\\\]+#', 
$sSubDirName)) {
wfProfileOut(__METHOD__);
return Status::newFatal('Requested subdirectory of ' . 
BS_CACHE_DIR . ' contains illegal chars');
@@ -45,8 +47,10 @@
 */
public static function ensureDataDirectory($sSubDirName = '') {
wfProfileIn(__METHOD__);
-   if (self::hasTraversal($sSubDirName))
+   if ( self::hasTraversal( $sSubDirName ) ) {
+   wfProfileOut( __METHOD__ );
return 
Status::newFatal(wfMessage("bs-filesystemhelper-has-path-traversal"));
+   }
if (!empty($sSubDirName) && !preg_match('#^[a-zA-Z/\\\]+#', 
$sSubDirName)) {
wfProfileOut(__METHOD__);
return Status::newFatal('Requested subdirectory of ' . 
BS_DATA_DIR . ' contains illegal chars');
@@ -84,8 +88,10 @@
public static function saveToCacheDirectory($sFileName, $data, 
$sSubDirName = '') {
wfProfileIn(__METHOD__);
$oStatus = self::ensureCacheDirectory($sSubDirName);
-   if (self::hasTraversal($sSubDirName . DS . $sFileName))
+   if ( self::hasTraversal( $sSubDirName . DS . $sFileName ) ) {
+   wfProfileOut( __METHOD__ );
return 
Status::newFatal(wfMessage("bs-filesystemhelper-has-path-traversal"));
+   }
if (!$oStatus->isGood()) {
wfProfileOut(__METHOD__);
return $oStatus;
@@ -109,8 +115,10 @@
public static function saveToDataDirectory($sFileName, $data, 
$sSubDirName = '') {
wfProfileIn(__METHOD__);
$oStatus = self::ensureDataDirectory($sSubDirName);
-   if (self::hasTraversal($sSubDirName . DS . $sFileName))
+   if ( self::hasTraversal( $sSubDirName . DS . $sFileName ) ) {
+   wfProfileOut( __METHOD__ );
return 
Status::newFatal(wfMessage("bs-filesystemhelper-has-path-traversal"));
+   }
if (!$oStatus->isGood()) {
wfProfileOut(__METHOD__);
return $oStatus;

-- 
To view, visit https://gerrit.wikimedia.org/r/376476
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic34375c7e74b46491705b76130a5537372b41b4c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceFoundation
Gerrit-Branch: master
Gerrit-Owner: Pwirth 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits