Fix malicious/bad JS exploits

This commit is contained in:
skull132
2017-04-01 16:57:56 +03:00
parent f6e91b621a
commit 0f3d8c083e
4 changed files with 26 additions and 1 deletions
+15
View File
@@ -175,6 +175,21 @@
user << browse('html/templates/welcome_screen.html', "window=greeting;size=640x500")
/*
* A proc used to close the server greeting window for a user.
* Args:
* - var/user client
* - var/reason text
*/
/datum/server_greeting/proc/close_window(var/client/user, var/reason)
if (!user)
return
if (reason)
user << span("notice", reason)
user << browse(null, "window=greeting")
/*
* Sends data to the JS controllers used in the server greeting.
* Also updates the user's preferences, if any of the hashes were out of date.