MegaAntiCheat / client-backend

GNU General Public License v3.0
117 stars 24 forks source link

Properly check for empty custom data #161

Closed Bash-09 closed 2 months ago

Bash-09 commented 2 months ago

Previously custom_data was considered empty if it was null or an empty string, array or object, however not if the object was a map which contained an empty string. This would result in some player records not being pruned if they had previously had any notes or an alias set, despite not currently storing any useful information because they contained multiple empty strings.

Custom data that looks like this:

"custom_data" : { 
    "alias" : "",
    "playerNote" : ""
}

Would not be pruned, whereas with these changes it does.

Bash-09 commented 2 months ago

Didn't break anything as far as I can tell