From 979f46b71e519d48e24bfe204bad063c39596518 Mon Sep 17 00:00:00 2001 From: Dmitry Yemanov Date: Mon, 27 Jan 2025 14:42:11 +0300 Subject: [PATCH] Corrections after testing. Password can include spaces. Remove username right padding, as trailing spaces are ignored anyway inside the engine. --- src/jrd/replication/Config.cpp | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/src/jrd/replication/Config.cpp b/src/jrd/replication/Config.cpp index 5a0257f5b4d..22b2370b1d2 100644 --- a/src/jrd/replication/Config.cpp +++ b/src/jrd/replication/Config.cpp @@ -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(); @@ -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) {