mirror of
https://github.com/Expand-sys/CCash
synced 2026-03-22 20:47:10 +11:00
names can no longer contain spaces
This commit is contained in:
parent
b4013a168f
commit
aa9f481fbe
1 changed files with 8 additions and 0 deletions
|
|
@ -6,6 +6,14 @@ int_fast8_t Bank::AddUser(const std::string &name, const std::string &init_pass)
|
|||
{
|
||||
return ErrorResponse::NameTooLong;
|
||||
}
|
||||
for (char c : name)
|
||||
{
|
||||
if (c == ' ')
|
||||
{
|
||||
return ErrorResponse::InvalidRequest;
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
std::shared_lock<std::shared_mutex> lock{size_l};
|
||||
return (users.try_emplace_l(
|
||||
|
|
|
|||
Loading…
Reference in a new issue