Skip to content

Commit fac1f35

Browse files
authored
fix: validate claimed id in auth handler
1 parent bf16922 commit fac1f35

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

web/includes/auth/handler/SteamAuthHandler.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ private function login()
2525
private function validate()
2626
{
2727
$pattern = "/^https:\/\/steamcommunity\.com\/openid\/id\/(7[0-9]{15,25}+)$/";
28+
29+
if (!preg_match($pattern, $this->openid->claimed_id))
30+
return false;
31+
2832
preg_match($pattern, $this->openid->identity, $match);
2933

3034
return (!empty($match[1])) ? $match[1] : false;

0 commit comments

Comments
 (0)