From bb26f21c71d7710bb17f3758acd3ce19322bb14c Mon Sep 17 00:00:00 2001 From: BonniePandora Date: Sat, 11 Jan 2020 02:43:58 +0000 Subject: [PATCH 1/2] I have no idea what I'm doing to be quite honest --- code/modules/admin/verbs/SDQL2/SDQL_2.dm | 7 +++++++ code/modules/admin/verbs/SDQL2/SDQL_2_wrappers.dm | 3 +++ 2 files changed, 10 insertions(+) diff --git a/code/modules/admin/verbs/SDQL2/SDQL_2.dm b/code/modules/admin/verbs/SDQL2/SDQL_2.dm index f5075b57b7..d2693a83b6 100644 --- a/code/modules/admin/verbs/SDQL2/SDQL_2.dm +++ b/code/modules/admin/verbs/SDQL2/SDQL_2.dm @@ -95,6 +95,10 @@ Don't crash the server, OK? + "UPDATE /mob/living/carbon/monkey SET #null = forceMove(usr.loc)" + + Writing "#null" in front of the "=" will call the proc and discard the return value. + A quick recommendation: before you run something like a DELETE or another query.. Run it through SELECT first. You'd rather not gib every player on accident. @@ -740,6 +744,9 @@ GLOBAL_DATUM_INIT(sdql2_vv_statobj, /obj/effect/statclick/SDQL2_VV_all, new(null var/datum/temp = d var/i = 0 for(var/v in sets) + if(v == "#null") + SDQL_expression(d, set_list[sets]) + break if(++i == sets.len) if(superuser) if(temp.vars.Find(v)) diff --git a/code/modules/admin/verbs/SDQL2/SDQL_2_wrappers.dm b/code/modules/admin/verbs/SDQL2/SDQL_2_wrappers.dm index 97a799824b..5b6d2155c5 100644 --- a/code/modules/admin/verbs/SDQL2/SDQL_2_wrappers.dm +++ b/code/modules/admin/verbs/SDQL2/SDQL_2_wrappers.dm @@ -217,6 +217,9 @@ /proc/_step_away(ref, trg, max) step_away(ref, trg, max) +/proc/_file(name) + return file(name) + /proc/_instantiate_at(thing, location) new thing(location) From f5995cfaaa9fd466670eecfa91de5e2ec8c24a41 Mon Sep 17 00:00:00 2001 From: kevinz000 <2003111+kevinz000@users.noreply.github.com> Date: Sun, 12 Jan 2020 00:36:52 -0800 Subject: [PATCH 2/2] this is a massive security risk --- code/modules/admin/verbs/SDQL2/SDQL_2_wrappers.dm | 3 --- 1 file changed, 3 deletions(-) diff --git a/code/modules/admin/verbs/SDQL2/SDQL_2_wrappers.dm b/code/modules/admin/verbs/SDQL2/SDQL_2_wrappers.dm index 5b6d2155c5..97a799824b 100644 --- a/code/modules/admin/verbs/SDQL2/SDQL_2_wrappers.dm +++ b/code/modules/admin/verbs/SDQL2/SDQL_2_wrappers.dm @@ -217,9 +217,6 @@ /proc/_step_away(ref, trg, max) step_away(ref, trg, max) -/proc/_file(name) - return file(name) - /proc/_instantiate_at(thing, location) new thing(location)