Skip to content

Commit

Permalink
Corrections after testing. Password can include spaces. Remove userna…
Browse files Browse the repository at this point in the history
…me right padding, as trailing spaces are ignored anyway inside the engine.
  • Loading branch information
dyemanov committed Jan 27, 2025
1 parent e601e51 commit cb9ffe7
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions src/jrd/replication/Config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,20 +133,11 @@ namespace
if (!file)
configError("missing or inaccessible file", key, filename.c_str());

// skip first empty lines
do
{
if (feof(file))
break;

if (!temp.LoadFromFile(file))
break;

temp.alltrim(" \t\r");
} while (temp.isEmpty());
if (temp.LoadFromFile(file))
temp.alltrim("\r");

if (temp.isEmpty())
configError("empty file", key, filename.c_str());
configError("first empty line of file", key, filename.c_str());
}

output = temp.c_str();
Expand All @@ -167,6 +158,7 @@ namespace
if (output.username.hasData())
configError("multiple values", output.database, "username");
parseExternalValue(key, value, output.username);
output.username.rtrim(" ");
}
else if (key.find("password") == 0)
{
Expand Down

0 comments on commit cb9ffe7

Please sign in to comment.