]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#4647] Addressed review comments
authorThomas Markwalder <tmark@isc.org>
Mon, 10 Aug 2026 11:50:37 +0000 (07:50 -0400)
committerThomas Markwalder <tmark@isc.org>
Mon, 10 Aug 2026 13:20:41 +0000 (13:20 +0000)
modified:   changelog_unreleased/4647-validatepath-allows-lease-file-path-outside-dhcp-data-dir
modified:   src/lib/util/tests/filesystem_unittests.cc

changelog_unreleased/4647-validatepath-allows-lease-file-path-outside-dhcp-data-dir
src/lib/util/tests/filesystem_unittests.cc

index bf801211fb0263c60a49b16ee309a4f018e92836..27a4297a01da5436379e764e863f75223567fc15 100644 (file)
@@ -1,4 +1,4 @@
 [bug]          wlodek, tmark
-       Path validation now rejects now rejects "." and ".." file names
+       Path validation now rejects "." and ".." file names
        as invalid (e.g. memfile lease database name "..").
        (Gitlab #4647)
index 01c283fb3be0e88c3ec7edd34521e24ff7614d27..fbca3c1f751f0c5672dba8a423c282d81a0066d7 100644 (file)
@@ -505,23 +505,29 @@ TEST_F(PathCheckerTest, validatePathEnforcePathFalse) {
         string("path: '' has no filename"),
         false
     },
+    {
+        // Empty filename.
+        __LINE__,
+        "",
+        "",
+        string("path: '' has no filename"),
+        false
+    },
     {
         // Bare ".." escapes the supported path via empty parent.
         __LINE__,
         "..",
         "",
-        string("invalid path specified: '..', supported path is '" +
-               def_path + "'"),
-        true
+        string("path: '..' has no filename"),
+        false
     },
     {
         // Supported path plus ".." also escapes despite matching parent.
         __LINE__,
         def_path + "/..",
         "",
-        string("invalid path specified: '..', supported path is '" +
-               def_path + "'"),
-        true
+        string("path: '" + def_path + "/..' has no filename"),
+        false
     }
     };