mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
added an additional filter to remove empty array items (#10803)
* ENH Added filter to remove empty/null from Path::join parts This is to ensure null values are removed and trim() deprecated warnings are not thrown Fixes #10802 * FIX revert public signature Co-authored-by: Steve Boyd <emteknetnz@gmail.com> --------- Co-authored-by: Steve Boyd <emteknetnz@gmail.com>
This commit is contained in:
parent
6fd7694cbc
commit
b6a3e3a951
@ -30,7 +30,7 @@ class Path
|
||||
}
|
||||
|
||||
// Cleanup and join all parts
|
||||
$parts = array_filter(array_map('trim', $parts ?? []));
|
||||
$parts = array_filter(array_map('trim', array_filter($parts ?? [])));
|
||||
$fullPath = static::normalise(implode(DIRECTORY_SEPARATOR, $parts));
|
||||
|
||||
// Protect against directory traversal vulnerability (OTG-AUTHZ-001)
|
||||
|
Loading…
Reference in New Issue
Block a user