1
0
Fork 0
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:
rubenwardy 2020-10-06 12:10:37 +01:00 committed by GitHub
parent f46509d5e2
commit e80fc22dd9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 23 additions and 3 deletions

View file

@ -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);