diff --git a/src/SpecialRequestAccount.php b/src/SpecialRequestAccount.php index 4ec4aa7..1144eac 100755 --- a/src/SpecialRequestAccount.php +++ b/src/SpecialRequestAccount.php @@ -78,7 +78,7 @@ function accountRequestFormData(&$out_error, IDatabase $dbr) { } //make sure the user actually commented the verification code - if (ScratchVerification::topVerifCommenter(ScratchVerification::sessionVerificationCode($session)) !== $username) { + if (strtolower(ScratchVerification::topVerifCommenter(ScratchVerification::sessionVerificationCode($session))) !== strtolower($username)) { $out_error = wfMessage('scratch-confirmaccount-verif-missing', $username)->parse(); return; } diff --git a/src/verification/ScratchUserCheck.php b/src/verification/ScratchUserCheck.php index d6bda3d..a6a8e6a 100644 --- a/src/verification/ScratchUserCheck.php +++ b/src/verification/ScratchUserCheck.php @@ -8,7 +8,9 @@ class ScratchUserCheck { private static function fetchProfile($username, &$isScratcher, &$joinedAt, &$error) { $url = sprintf(self::PROFILE_URL, $username); - $html = @file_get_contents($url); + $html = @file_get_contents($url, false, stream_context_create([ + 'http' => ['header' => "Accept-Language: en\r\nCookie: scratchlanguage=en"] + ])); if ($html === false) { $isScratcher = null; // can't tell Scratcher status $error = 'scratch-confirmaccount-profile-error';