summaryrefslogtreecommitdiff
path: root/src/helpers/vyos-load-config.py
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2023-11-20 18:32:06 +0100
committerGitHub <noreply@github.com>2023-11-20 18:32:06 +0100
commit13f6688bdbdeaf869ace5c892154c14c4b007d43 (patch)
tree19b4d1309252a974c1635f1df71efb8a843df48e /src/helpers/vyos-load-config.py
parent391bd40f863b490241c6101e6333ba1327f32586 (diff)
parentfe9b08665367b8e7d9b906a0760d44efc9b5cafb (diff)
downloadvyos-1x-13f6688bdbdeaf869ace5c892154c14c4b007d43.tar.gz
vyos-1x-13f6688bdbdeaf869ace5c892154c14c4b007d43.zip
Merge pull request #2511 from jestabro/load-file-name
T5763: fix imprecise check for remote file name
Diffstat (limited to 'src/helpers/vyos-load-config.py')
-rwxr-xr-xsrc/helpers/vyos-load-config.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/helpers/vyos-load-config.py b/src/helpers/vyos-load-config.py
index e579e81b2..4ec865454 100755
--- a/src/helpers/vyos-load-config.py
+++ b/src/helpers/vyos-load-config.py
@@ -66,7 +66,7 @@ def get_local_config(filename):
return config_str
-if any(x in file_name for x in protocols):
+if any(file_name.startswith(f'{x}://') for x in protocols):
config_string = vyos.remote.get_remote_config(file_name)
if not config_string:
sys.exit(f"No such config file at '{file_name}'")