Skip to content

Commit

Permalink
fix: steam provider offset error (#621)
Browse files Browse the repository at this point in the history
  • Loading branch information
atymic authored Jan 29, 2021
1 parent b57fcbe commit 1424cc7
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,13 @@ public function validate()

$results = $this->parseResults($response->getBody()->getContents());

$this->parseSteamID();
$isValid = $results['is_valid'] === 'true';

return $results['is_valid'] === 'true';
if ($isValid) {
$this->parseSteamID();
}

return $isValid;
}

/**
Expand Down Expand Up @@ -279,7 +283,7 @@ public function parseSteamID()
$matches
);

$this->steamId = is_numeric($matches[1]) ? $matches[1] : 0;
$this->steamId = isset($matches[1]) && is_numeric($matches[1]) ? $matches[1] : 0;
}

/**
Expand Down

2 comments on commit 1424cc7

@GusevVasily
Copy link

@GusevVasily GusevVasily commented on 1424cc7 Feb 9, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@atymic hi, I ran into such a problem that I can't log in, because in return_to it substitutes the address of my site with httpS://, and in realm it puts just http://
I had to manually deliver in your code S. Can you fix it in the next version? Thanks for your attention.

Screenshot: http://prntscr.com/ytzjz8

@atymic
Copy link
Member Author

@atymic atymic commented on 1424cc7 Feb 9, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you open an issue?

I don't think this PR specifically broke it, as there's no changes re; realms.

Please sign in to comment.