Skip to content

Commit

Permalink
Merge pull request #462 from Exileum/bugfix/privmsg_clean_username
Browse files Browse the repository at this point in the history
Fix multiple variable cleanup in private messaging
  • Loading branch information
Exileum committed Jun 24, 2018
2 parents 7414716 + 194e697 commit 5078ed6
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions privmsg.php
Expand Up @@ -779,9 +779,7 @@

if ($submit) {
if (!empty($_POST['username'])) {
$to_username = clean_username($_POST['username']);
$to_username_sql = DB()->escape($to_username);
$to_userdata = get_userdata($to_username_sql);
$to_userdata = get_userdata($_POST['username']);

if (!$to_userdata || $to_userdata['user_id'] == GUEST_UID) {
$error = true;
Expand Down

0 comments on commit 5078ed6

Please sign in to comment.