mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 08:35:20 +02:00
Prevent games from setting secure settings (#10460)
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user