Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/candidate-9.2.x' into candidate-…
Browse files Browse the repository at this point in the history
…9.4.x

Signed-off-by: Gavin Halliday <[email protected]>

# Conflicts:
#	helm/hpcc/Chart.yaml
#	helm/hpcc/templates/_helpers.tpl
#	helm/hpcc/templates/dafilesrv.yaml
#	helm/hpcc/templates/dali.yaml
#	helm/hpcc/templates/dfuserver.yaml
#	helm/hpcc/templates/eclagent.yaml
#	helm/hpcc/templates/eclccserver.yaml
#	helm/hpcc/templates/eclscheduler.yaml
#	helm/hpcc/templates/esp.yaml
#	helm/hpcc/templates/localroxie.yaml
#	helm/hpcc/templates/roxie.yaml
#	helm/hpcc/templates/sasha.yaml
#	helm/hpcc/templates/thor.yaml
#	version.cmake
  • Loading branch information
ghalliday committed Feb 2, 2024
2 parents 355fd45 + da3661d commit 5538d9b
Show file tree
Hide file tree
Showing 3 changed files with 264 additions and 283 deletions.
23 changes: 22 additions & 1 deletion dali/base/dautils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,28 @@ IPropertyTree * getDropZonePlane(const char * name)

bool isPathInPlane(IPropertyTree *plane, const char *path)
{
return isEmptyString(path) || startsWith(path, plane->queryProp("@prefix"));
if (isEmptyString(path))
return true;

const char *prefix = plane->queryProp("@prefix");
if (isEmptyString(prefix))
return false; //prefix is empty, path is not - can't match.

while (*prefix && *prefix == *path)
{
path++;
prefix++;
}
if (0 == *prefix)
{
if (0 == *path || isPathSepChar(*path))
return true;
if (isPathSepChar(*(path - 1))) //implies both last characters of prefix and path were '/'
return true;
}
else if (0 == *path && isPathSepChar(*prefix) && (0 == *(prefix + 1)))
return true;
return false;
}

bool validateDropZone(IPropertyTree * plane, const char * path, const char * host, bool ipMatch)
Expand Down
Loading

0 comments on commit 5538d9b

Please sign in to comment.