From 8187d87fb2a751d93e40eaa887c256d77a034ea1 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Sat, 12 Dec 2020 20:11:49 +0100 Subject: [PATCH] [MIRROR] [s]Fix inverted check where if permanent rank changes were disabled in the config, all rank changes would instead always go to the db, even bypassing DBRANK checks. (#2146) * [s]Fix inverted check where if permanent rank changes were disabled in the config, all rank changes would instead always go to the db, even bypassing DBRANK checks. (#55485) As this is an admin accessible exploit bypassing the `DBRANKS` flag, merge should slightly rushed but not like "stop the presses" rushed. * [s]Fix inverted check where if permanent rank changes were disabled in the config, all rank changes would instead always go to the db, even bypassing DBRANK checks. Co-authored-by: Kyle Spier-Swenson --- code/modules/admin/permissionedit.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/admin/permissionedit.dm b/code/modules/admin/permissionedit.dm index 46de3d1d339..56f4f693886 100644 --- a/code/modules/admin/permissionedit.dm +++ b/code/modules/admin/permissionedit.dm @@ -402,7 +402,7 @@ return var/m1 = "[key_name_admin(usr)] edited the permissions of [use_db ? " rank [D.rank.name] permanently" : "[admin_key] temporarily"]" var/m2 = "[key_name(usr)] edited the permissions of [use_db ? " rank [D.rank.name] permanently" : "[admin_key] temporarily"]" - if(use_db || legacy_only) + if(use_db && !legacy_only) var/rank_name = D.rank.name var/old_flags var/old_exclude_flags