Skip to content

Can't delete bans with exploited names #373

Open
@shavitush

Description

@shavitush

Exploited names cannot have their bans deleted/unbanned.

Expected Behavior

Having the ability to unban every banned player.

Current Behavior

Cannot unban the exploited name user:

<!-- a legit player's ban -->
<a href="#" onclick="RemoveBan('18133', '?????????????????', '', 'Lost', 0, false);return false;" target="_self"><img src="images/delete.png" alt="" style="vertical-align:middle" border="0"> Delete Ban </a>

<!-- an exploited name's ban -->
<a href="#" onclick="RemoveBan('18135', '?????????????????', '', '// heaven.gg - 
', 0, false);return false;" target="_self"><img src="images/delete.png" alt="" style="vertical-align:middle" border="0"> Delete Ban </a>

Possible Solution

Escape special characters in names? (or even add it into StripQuotes)

function StripQuotes($str)
{
    $str = str_replace("'", "", $str);
    $str = str_replace('"', "", $str);
    return $str;
}

to

function StripQuotes($str)
{
    $str = str_replace("'", "", $str);
    $str = str_replace('"', "", $str);
    $str = trim(preg_replace('/\s+/', ' ', $str));
    return $str;
}

Steps to Reproduce (for bugs)

No clue. It requires a cheat in-game. Possibly \n in a name?

Your Environment

Metadata

Metadata

Assignees

Type

No type

Projects

Status

To do

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions