Add support for blacklisting common passwords
[lhc/web/wiklou.git] / includes / Setup.php
index 355b03a..bd20ac3 100644 (file)
@@ -516,6 +516,21 @@ MWExceptionHandler::installHandler();
 
 require_once "$IP/includes/compat/normal/UtfNormalUtil.php";
 
+
+$ps_validation = Profiler::instance()->scopedProfileIn( $fname . '-validation' );
+
+// T48998: Bail out early if $wgArticlePath is non-absolute
+if ( !preg_match( '/^(https?:\/\/|\/)/', $wgArticlePath ) ) {
+       throw new FatalError(
+               '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>.'
+       );
+}
+
+Profiler::instance()->scopedProfileOut( $ps_validation );
+
 $ps_default2 = Profiler::instance()->scopedProfileIn( $fname . '-defaults2' );
 
 if ( $wgCanonicalServer === false ) {
@@ -627,7 +642,10 @@ $wgMemc = wfGetMainCache();
 $messageMemc = wfGetMessageCacheStorage();
 $parserMemc = wfGetParserCacheStorage();
 
-wfDebugLog( 'caches', 'main: ' . get_class( $wgMemc ) .
+wfDebugLog( 'caches',
+       'cluster: ' . get_class( $wgMemc ) .
+       ', WAN: ' . $wgMainWANCache .
+       ', stash: ' . $wgMainStash .
        ', message: ' . get_class( $messageMemc ) .
        ', parser: ' . get_class( $parserMemc ) );