mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-09-03 15:35:17 +00:00
[#3832] Reindented
This commit is contained in:
committed by
Andrei Pavel
parent
919d3cbbb6
commit
03aac8f424
@@ -239,19 +239,19 @@ FileManager::validatePath(const std::string supported_path_str, const std::strin
|
|||||||
|
|
||||||
auto parent_path = input_path.parentPath();
|
auto parent_path = input_path.parentPath();
|
||||||
if (!parent_path.empty()) {
|
if (!parent_path.empty()) {
|
||||||
if (!enforce_path) {
|
if (!enforce_path) {
|
||||||
// Security set to lax, let it fly.
|
// Security set to lax, let it fly.
|
||||||
return (input_path_str);
|
return (input_path_str);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// We only allow absolute path equal to default. Catch an invalid path.
|
// We only allow absolute path equal to default. Catch an invalid path.
|
||||||
if (parent_path != supported_path_copy) {
|
if (parent_path != supported_path_copy) {
|
||||||
isc_throw(BadValue, "invalid path specified: '"
|
isc_throw(BadValue, "invalid path specified: '"
|
||||||
<< parent_path << "', supported path is '"
|
<< parent_path << "', supported path is '"
|
||||||
<< supported_path_copy << "'");
|
<< supported_path_copy << "'");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string valid_path(supported_path_copy + "/" + filename);
|
std::string valid_path(supported_path_copy + "/" + filename);
|
||||||
return (valid_path);
|
return (valid_path);
|
||||||
|
Reference in New Issue
Block a user