diff --git a/code/modules/client/client_procs.dm b/code/modules/client/client_procs.dm index 923882a4f14..01651974701 100644 --- a/code/modules/client/client_procs.dm +++ b/code/modules/client/client_procs.dm @@ -1,7 +1,8 @@ //////////// //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 2621440 //Restricts admin client uploads to the server to 2.5MB 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", @@ -180,7 +181,11 @@ 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, "Error: AllowUpload(): File Upload too large. Upload Limit: [UPLOAD_LIMIT_ADMIN/1024]KiB.") + return FALSE + else if(filelength > UPLOAD_LIMIT) to_chat(src, "Error: AllowUpload(): File Upload too large. Upload Limit: [UPLOAD_LIMIT/1024]KiB.") return FALSE return TRUE