Bartosz Dziewoński has uploaded a new change for review.
https://gerrit.wikimedia.org/r/252582
Change subject: Really validate that $wgArticlePath starts with a slash
......................................................................
Really validate that $wgArticlePath starts with a slash
The regular expression wasn't entirely correct.
Follow-up to a4a3d0454069c25a24e2bfe732a665cc6a865878.
Bug: T48998
Change-Id: I08bdf2db20c1c3de55527fc812bcbb55fa23f7bc
---
M includes/Setup.php
1 file changed, 4 insertions(+), 4 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/82/252582/1
diff --git a/includes/Setup.php b/includes/Setup.php
index d826b87..bd20ac3 100644
--- a/includes/Setup.php
+++ b/includes/Setup.php
@@ -520,12 +520,12 @@
$ps_validation = Profiler::instance()->scopedProfileIn( $fname . '-validation'
);
// T48998: Bail out early if $wgArticlePath is non-absolute
-if ( !preg_match( '/^https?:\/\/|\//', $wgArticlePath ) ) {
+if ( !preg_match( '/^(https?:\/\/|\/)/', $wgArticlePath ) ) {
throw new FatalError(
- 'If you use a relative URL on $wgArticlePath, it must start ' .
- 'with a slash (/).<br><br>See ' .
+ 'If you use a relative URL for $wgArticlePath, it must start ' .
+ 'with a slash (<code>/</code>).<br><br>See ' .
'<a
href="https://www.mediawiki.org/wiki/Manual:$wgArticlePath">' .
- 'https://www.mediawiki.org/wiki/Manual:$wgArticlePath</a>'
+ 'https://www.mediawiki.org/wiki/Manual:$wgArticlePath</a>.'
);
}
--
To view, visit https://gerrit.wikimedia.org/r/252582
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I08bdf2db20c1c3de55527fc812bcbb55fa23f7bc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits