[MIRROR] [s] Require affirmative input from the admin to run sdql2 verbs [MDB IGNORE] (#22025)

* [s] Require affirmative input from the admin to run sdql2 verbs (#76276)

Powerful or dangerous admin verbs should have some prompt or forced
runtime input to lower the attack surface once somebody finds a href
exploit since topics can trigger commands and verbs.

* [s] Require affirmative input from the admin to run sdql2 verbs

---------

Co-authored-by: Kyle Spier-Swenson <kyleshome@gmail.com>
This commit is contained in:
SkyratBot
2023-06-24 14:23:47 +01:00
committed by GitHub
co-authored by Kyle Spier-Swenson
parent c6dde20f5d
commit 13ba3d7622
+3
View File
@@ -201,6 +201,9 @@
message_admins(span_danger("ERROR: Non-admin [key_name(usr)] attempted to execute a SDQL query!"))
usr.log_message("non-admin attempted to execute a SDQL query!", LOG_ADMIN)
return FALSE
var/prompt = tgui_alert(usr, "Run SDQL2 Query?", "SDQL2", list("Yes", "Cancel"))
if (prompt != "Yes")
return
var/list/results = world.SDQL2_query(query_text, key_name_admin(usr), "[key_name(usr)]")
if(length(results) == 3)
for(var/I in 1 to 3)