Skip to content

Commit

Permalink
Checked if there are three jwt
Browse files Browse the repository at this point in the history
  • Loading branch information
Zwuiix-cmd committed Aug 14, 2024
1 parent 9ff9361 commit 6543db5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/LoginPacket.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ protected function decodeConnectionRequest(string $binary) : void{
if(!is_array($chainDataJson["chain"])){
throw new PacketDecodeException("Chain data 'chain' element must be a list of strings");
}
if(count($chainDataJson["chain"]) !== 3) {
throw new PacketDecodeException("Chain data 'chain' must contain three jwt");
}

$jwts = [];
foreach($chainDataJson["chain"] as $jwt){
if(!is_string($jwt)){
Expand Down

0 comments on commit 6543db5

Please sign in to comment.