Skip to content

Commit

Permalink
Merge pull request #16 from binarious/patch-1
Browse files Browse the repository at this point in the history
fix(U2FAuthenticator): cast port to int
  • Loading branch information
darookee authored May 3, 2017
2 parents 468a93a + 6c33983 commit 7617690
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Security/TwoFactor/Prodiver/U2F/U2FAuthenticator.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ public function __construct(RequestStack $requestStack)
$scheme = $requestStack->getCurrentRequest()->getScheme();
$host = $requestStack->getCurrentRequest()->getHost();
$port = $requestStack->getCurrentRequest()->getPort();
$this->u2f = new \u2flib_server\U2F($scheme.'://'.$host.((80 !== $port && 443 !== $port)?':'.$port:''));
$intPort = (int) $port;
$this->u2f = new \u2flib_server\U2F($scheme.'://'.$host.((80 !== $intPort && 443 !== $intPort)?':'.$port:''));
}
/**
* generateRequest
Expand Down

0 comments on commit 7617690

Please sign in to comment.