Skip to content
This repository has been archived by the owner on Sep 25, 2021. It is now read-only.

Commit

Permalink
Fix XSS flaw in friend.php
Browse files Browse the repository at this point in the history
To test this flaw enter the following for the friend's email. Then when it returns the error on the email address move the mouse over the email address field to activate.

sample%40email.tst" onmouseover=prompt(971889) bad="
  • Loading branch information
Bushstar committed Mar 28, 2014
1 parent 9833d3f commit 267b4ac
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions friend.php
Expand Up @@ -111,11 +111,11 @@
'CAPTCHATYPE' => $system->SETTINGS['spam_register'],
'CAPCHA' => (isset($capcha_text)) ? $capcha_text : '',
'TITLE' => $TPL_item_title,
'FRIEND_NAME' => (isset($_POST['friend_name'])) ? $_POST['friend_name'] : '',
'FRIEND_EMAIL' => (isset($_POST['friend_email'])) ? $_POST['friend_email'] : '',
'YOUR_NAME' => ($user->logged_in) ? $user->user_data['name'] : '',
'YOUR_EMAIL' => ($user->logged_in) ? $user->user_data['email'] : '',
'COMMENT' => (isset($_POST['sender_comment'])) ? $_POST['sender_comment'] : '',
'FRIEND_NAME' => (isset($_POST['friend_name'])) ? $system->cleanvars($_POST['friend_name']) : '',
'FRIEND_EMAIL' => (isset($_POST['friend_email'])) ? $system->cleanvars($_POST['friend_email']) : '',
'YOUR_NAME' => ($user->logged_in) ? $system->cleanvars($user->user_data['name']) : '',
'YOUR_EMAIL' => ($user->logged_in) ? $system->cleanvars($user->user_data['email']) : '',
'COMMENT' => (isset($_POST['sender_comment'])) ? $system->cleanvars($_POST['sender_comment']) : '',
'EMAILSENT' => $emailsent
));

Expand Down

0 comments on commit 267b4ac

Please sign in to comment.