Skip to content

Commit 1e25e6d

Browse files
authored
Merge pull request #615 from x-tools/preg-quote-uselang
Escape uselang param when checking against project name
2 parents c59402c + a9f1065 commit 1e25e6d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/EventSubscriber/RateLimitSubscriber.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ private function logCrawlers(): void {
172172

173173
// If requesting the same language as the target project, ignore.
174174
// FIXME: This has side-effects (T384711#10759078)
175-
if ( preg_match( "/[=\/]$useLang.?wik/", $this->uri ) === 1 ) {
175+
if ( preg_match( '/[=\/]' . preg_quote( $useLang ) . '.?wik/', $this->uri ) === 1 ) {
176176
return;
177177
}
178178

0 commit comments

Comments
 (0)