mirror of
https://github.com/overte-org/overte.git
synced 2025-04-11 05:22:11 +02:00
add a simple IP address sanitizer for DS settings save
This commit is contained in:
parent
4cdc98287b
commit
5eb890e4f5
1 changed files with 11 additions and 1 deletions
|
@ -495,7 +495,17 @@ void DomainServerSettingsManager::unpackPermissions() {
|
|||
|
||||
needPack |= unpackPermissionsForKeypath(AGENT_PERMISSIONS_KEYPATH, &_agentPermissions);
|
||||
|
||||
needPack |= unpackPermissionsForKeypath(IP_PERMISSIONS_KEYPATH, &_ipPermissions);
|
||||
needPack |= unpackPermissionsForKeypath(IP_PERMISSIONS_KEYPATH, &_ipPermissions,
|
||||
[&](NodePermissionsPointer perms){
|
||||
// make sure that this permission row is for a valid IP address
|
||||
if (QHostAddress(perms->getKey().first).isNull()) {
|
||||
_ipPermissions.remove(perms->getKey());
|
||||
|
||||
// we removed a row from the IP permissions, we'll need a re-pack
|
||||
needPack = true;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
needPack |= unpackPermissionsForKeypath(GROUP_PERMISSIONS_KEYPATH, &_groupPermissions,
|
||||
[&](NodePermissionsPointer perms){
|
||||
|
|
Loading…
Reference in a new issue