Skip to content

Commit 6d326f2

Browse files
committed
Lowercase all of the input before sending it to the code
Reported on the wikitech-l mailing list
1 parent 55299b6 commit 6d326f2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
ini_set('display_errors', 'On');
55

66
$lang = isset( $_REQUEST['lang'] ) ? $_REQUEST['lang'] : '';
7-
preg_match_all( '/[a-z-]+/', $lang, $matches );
7+
preg_match_all( '/[a-z-]+/', strtolower( $lang ), $matches );
88
$languages = $matches[0];
99

1010
$hasFormData = $languages !== [] && (

0 commit comments

Comments
 (0)