Skip to content

Commit

Permalink
[s] Require affirmative input from the admin to run sdql2 verbs (#3710)
Browse files Browse the repository at this point in the history
"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."

Thanks MSO

tgstation/tgstation#76276
  • Loading branch information
Zonespace27 authored Jun 25, 2023
1 parent cb4b498 commit 2fe028d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions code/modules/admin/verbs/SDQL2/SDQL_2.dm
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,9 @@
message_admins(SPAN_DANGER("ERROR: Non-admin [key_name(usr)] attempted to execute a SDQL query!"))
log_admin("non-admin attempted to execute a SDQL query!")
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)
Expand Down

0 comments on commit 2fe028d

Please sign in to comment.