From d1a6b271ca91299b50c5b40c6235c8754a9f4104 Mon Sep 17 00:00:00 2001 From: Retro_Guy Date: Tue, 23 Jul 2024 04:36:54 -0700 Subject: [PATCH] Truncate usernames received by post/get to help avoid abuse. --- Rocksolid_Light/rocksolid/post.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Rocksolid_Light/rocksolid/post.php b/Rocksolid_Light/rocksolid/post.php index 47b2a97..f7d060b 100644 --- a/Rocksolid_Light/rocksolid/post.php +++ b/Rocksolid_Light/rocksolid/post.php @@ -58,6 +58,9 @@ if ($setcookies) { $name = $_COOKIE["mail_name"]; } +// Truncate username at 30 characters to avoid abuse +$name = substr($name, 0, 30); + $logged_in = false; if(trim($name) != '') { $logged_in = verify_logged_in(trim(strtolower($name)));