Disallow inclusion of .pbl files from WML (bug #23504)
Note that this will also cause Lua wesnoth.have_file() to return false on .pbl files.
This commit is contained in:
parent
78848c2cef
commit
f1512512de
3 changed files with 11 additions and 0 deletions
|
@ -37,6 +37,7 @@ Version 1.12.2+dev:
|
|||
* Made silence.ogg larger to work around a crash involving the multiplayer
|
||||
lobby with music and sound enabled (bug #23633, possibly also bug #23599,
|
||||
bug #23203, bug #23026).
|
||||
* Disallowed inclusion of .pbl files from WML (bug #23504).
|
||||
|
||||
Version 1.12.2:
|
||||
* Security fixes:
|
||||
|
|
|
@ -1025,6 +1025,11 @@ std::string get_wml_location(const std::string &filename, const std::string &cur
|
|||
return result;
|
||||
}
|
||||
|
||||
if (ends_with(filename, ".pbl")) {
|
||||
ERR_FS << "Illegal path '" << filename << "' (.pbl files are not allowed)." << std::endl;
|
||||
return result;
|
||||
}
|
||||
|
||||
bool already_found = false;
|
||||
|
||||
if (filename[0] == '~')
|
||||
|
|
|
@ -979,6 +979,11 @@ static bool is_legal_file(const std::string &filename)
|
|||
return false;
|
||||
}
|
||||
|
||||
if (ends_with(filename, ".pbl")) {
|
||||
ERR_FS << "Illegal path '" << filename << "' (.pbl files are not allowed)." << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue