Skip to content

Commit

Permalink
Username should be in lowercase
Browse files Browse the repository at this point in the history
  • Loading branch information
PatBriPerso authored and csavelief committed Jul 4, 2024
1 parent f432772 commit b3f12ab
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/Models/YnhServer.php
Original file line number Diff line number Diff line change
Expand Up @@ -1049,6 +1049,7 @@ private function sshCreateUserProfile(SshConnection2 $ssh, string $fullname, str
}

$fullname = preg_replace("/[^A-Za-z0-9 ,.'-]/", '', $fullname);
$fullname = Str::lower($fullname);
$password = Str::replace('!', '\!', $password); // history substitution
$ssh->newTrace(SshTraceStateEnum::IN_PROGRESS, 'Creating user profile...');
$isOk = $ssh->executeCommand("sudo yunohost user create {$username} -F \"{$fullname}\" -p \"{$password}\" -d {$domain->name}", $output);
Expand Down

0 comments on commit b3f12ab

Please sign in to comment.