Legoktm has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/395162 )
Change subject: Don't try to write crazy filenames for DPL cache files
......................................................................
Don't try to write crazy filenames for DPL cache files
The filename on the bug report is ridiculously long and looks sketchy. Since
all we need is a unique filename, use sha1() to sanitize it.
Bug: T174086
Change-Id: I2c107da2dcf0ff1f8cb12c1102358210e51454e0
---
M DPLMain.php
1 file changed, 1 insertion(+), 1 deletion(-)
git pull
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DynamicPageList
refs/changes/62/395162/1
diff --git a/DPLMain.php b/DPLMain.php
index c570fe1..a2bcce0 100644
--- a/DPLMain.php
+++ b/DPLMain.php
@@ -1376,7 +1376,7 @@
case 'dplcache':
if ( $sArg != '' ) {
- $DPLCache =
$parser->mTitle->getArticleID() . '_' . str_replace( '/', '_', $sArg ) .
'.dplc';
+ $DPLCache = sha1(
$parser->mTitle->getArticleID() . '_' . str_replace( '/', '_', $sArg ) ) .
'.dplc';
$DPLCachePath =
$parser->mTitle->getArticleID() % 10;
} else {
$output .=
$logger->msgWrongParam( 'dplcache', $sArg );
--
To view, visit https://gerrit.wikimedia.org/r/395162
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I2c107da2dcf0ff1f8cb12c1102358210e51454e0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DynamicPageList
Gerrit-Branch: master
Gerrit-Owner: Legoktm <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits