mirror of
https://github.com/Sandstorm-Station/Sandstorm-Station-13.git
synced 2026-08-23 05:08:54 +01:00
Ports tgstation/53371 (#60)
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
////////////
|
||||
//SECURITY//
|
||||
////////////
|
||||
#define UPLOAD_LIMIT 1048576 //Restricts client uploads to the server to 1MB //Could probably do with being lower.
|
||||
#define UPLOAD_LIMIT 524288 //Restricts client uploads to the server to 0.5MB
|
||||
#define UPLOAD_LIMIT_ADMIN 5242880 //Restricts admin client uploads to the server to 5MB
|
||||
//(bumps admin's up to 5, admins should be trustworthy enough to not do shit)
|
||||
|
||||
GLOBAL_LIST_INIT(blacklisted_builds, list(
|
||||
"1407" = "bug preventing client display overrides from working leads to clients being able to see things/mobs they shouldn't be able to see",
|
||||
@@ -199,11 +201,14 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
|
||||
|
||||
//This stops files larger than UPLOAD_LIMIT being sent from client to server via input(), client.Import() etc.
|
||||
/client/AllowUpload(filename, filelength)
|
||||
if(filelength > UPLOAD_LIMIT)
|
||||
if(holder)
|
||||
if(filelength > UPLOAD_LIMIT_ADMIN)
|
||||
to_chat(src, "<font color='red'>Error: AllowUpload(): File Upload too large. Upload Limit: [UPLOAD_LIMIT_ADMIN/1024]KiB.</font>")
|
||||
return FALSE
|
||||
else if(filelength > UPLOAD_LIMIT)
|
||||
to_chat(src, "<font color='red'>Error: AllowUpload(): File Upload too large. Upload Limit: [UPLOAD_LIMIT/1024]KiB.</font>")
|
||||
return 0
|
||||
return 1
|
||||
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
///////////
|
||||
//CONNECT//
|
||||
|
||||
Reference in New Issue
Block a user