Skip to content

Commit

Permalink
Fixed RCON server password hashing when game server type is unknown
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianLeChat committed Jun 16, 2024
1 parent 1edc377 commit f469bea
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Controller/UserController.php
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,8 @@ public function register(Request $request, LoginLinkHandlerInterface $loginLinkH
// Récupération de l'identifiant unique du jeu.
$server->setGame($this->serverManager->getGameIDByAddress($serverAddress, $serverPort));
}
elseif (!empty($serverPassword))

if (!empty($serverPassword))
{
// Chiffrement du mot de passe administrateur.
$server->setPassword($this->serverManager->encryptPassword($serverPassword));
Expand Down Expand Up @@ -594,7 +595,8 @@ public function new(Request $request): Response
// Récupération de l'identifiant unique du jeu.
$server->setGame($this->serverManager->getGameIDByAddress($address, $port));
}
elseif (!empty($password))

if (!empty($password))
{
// Chiffrement du mot de passe administrateur.
$server->setPassword($this->serverManager->encryptPassword($password));
Expand Down

0 comments on commit f469bea

Please sign in to comment.