mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Prevent games from setting secure settings (#10460)
This commit is contained in:
parent
f46509d5e2
commit
e80fc22dd9
4 changed files with 23 additions and 3 deletions
|
@ -1039,6 +1039,19 @@ void Settings::deregisterChangedCallback(const std::string &name,
|
|||
}
|
||||
}
|
||||
|
||||
void Settings::removeSecureSettings()
|
||||
{
|
||||
for (const auto &name : getNames()) {
|
||||
if (name.compare(0, 7, "secure.") != 0)
|
||||
continue;
|
||||
|
||||
errorstream << "Secure setting " << name
|
||||
<< " isn't allowed, so was ignored."
|
||||
<< std::endl;
|
||||
remove(name);
|
||||
}
|
||||
}
|
||||
|
||||
void Settings::doCallbacks(const std::string &name) const
|
||||
{
|
||||
MutexAutoLock lock(m_callback_mutex);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue