Hashar has uploaded a new change for review.
https://gerrit.wikimedia.org/r/110926
Change subject: Replace easter egg by a more explaining message
......................................................................
Replace easter egg by a more explaining message
and make appearance the same
Bug: 60741
Change-Id: I24ff4d72a447dae03fa7c92fa6b2189a62105b1d
---
M docroot/noc/conf/highlight.php
M tests/noc-conf/highlightTest.php
2 files changed, 3 insertions(+), 10 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config
refs/changes/26/110926/1
diff --git a/docroot/noc/conf/highlight.php b/docroot/noc/conf/highlight.php
index 3963508..a2713be 100644
--- a/docroot/noc/conf/highlight.php
+++ b/docroot/noc/conf/highlight.php
@@ -44,9 +44,8 @@
echo "File not found\n";
exit;
}
- // Easter egg
- $hlHtml = highlight_string( '<'."?php\n\$secretSitePassword =
'jgmeidj28gms';\n", true );
-
+ // No filename given or filename not existing in this directory
+ $hlHtml = "<pre>No valid, whitelisted filename in parameter \"file\"
given.</pre>";
} else {
// Follow symlink
if ( !file_exists( $selectedFilePath ) ) {
@@ -86,17 +85,11 @@
</head>
<body>
<h1><a href="./">«</a> <?php echo $selectedFileNameEsc; ?></h1>
-<?php
-if ( $selectedFilePath !== false ) :
-?>
<p>(
<a
href="https://git.wikimedia.org/history/operations%2Fmediawiki-config.git/HEAD/<?php
echo urlencode( $selectedFileRepoPathEsc ); ?>">version control</a> •
<a
href="https://git.wikimedia.org/blame/operations%2Fmediawiki-config.git/HEAD/<?php
echo urlencode( $selectedFileRepoPathEsc ); ?>">blame</a> •
<a href="<?php echo $selectedFileViewRawUrlEsc; ?>">raw text</a>
)</p>
-<?php
-endif;
-?>
<hr>
<?php echo $hlHtml; ?>
</body>
diff --git a/tests/noc-conf/highlightTest.php b/tests/noc-conf/highlightTest.php
index 7d7d58f..ac7da5b 100644
--- a/tests/noc-conf/highlightTest.php
+++ b/tests/noc-conf/highlightTest.php
@@ -78,7 +78,7 @@
/**
* @dataProvider provideInvalidCases
*/
- public function testInvalidCases( $q, $expect = 'secretSitePassword' ) {
+ public function testInvalidCases( $q, $expect = 'No valid, whitelisted
filename' ) {
$this->assertContains(
$expect,
$this->runHighlight( $q ),
--
To view, visit https://gerrit.wikimedia.org/r/110926
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I24ff4d72a447dae03fa7c92fa6b2189a62105b1d
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Hashar <[email protected]>
Gerrit-Reviewer: Se4598 <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits