Better guild validations, Fix #457

This commit is contained in:
Znote
2021-07-22 17:30:49 +02:00
parent 1701d48629
commit ddd54a932e
2 changed files with 36 additions and 14 deletions

View File

@@ -457,7 +457,7 @@ function get_guild_rank_data($gid) {
// Creates a guild, where cid is the owner of the guild, and name is the name of guild.
function create_guild($cid, $name) {
$cid = (int)$cid;
$name = sanitize($name);
$name = trim(preg_replace('/\s\s+/', ' ', str_replace("\n", " ", sanitize($name))));
$time = time();
// Create the guild