Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Security issue with AjaxQuote
AjaxQuote/ajax.php give the comment body without checking the permissions of the user on the comment.
Here is a fix:
Here is a fix:
<?php
include("../../appg/settings.php");
include("../../conf/settings.php");
include("../../appg/init_ajax.php");
if (!$CommentID = ForceIncomingInt('CommentID', 0)) echo 'ERROR';
else {
$UserID = $Context->Session->UserID;
$cm = $Context->ObjectFactory->NewContextObject($Context, 'CommentManager');
if(!$Comment = $cm->GetCommentById($CommentID, $UserID)) echo 'ERROR';
else {
if(($Comment->WhisperUserID > 0 &&
$Comment->AuthUserID != $UserID && $Comment->WhisperUserID != $UserID &&
!$Context->Session->User->Permission('PERMISSION_VIEW_ALL_WHISPERS')
) ||
($Comment->DiscussionWhisperUserID > 0 &&
$Comment->AuthUserID != $UserID && $Comment->DiscussionWhisperUserID != $UserID &&
!$Context->Session->User->Permission('PERMISSION_VIEW_ALL_WHISPERS')
) ) echo 'ERROR';
else echo $Comment->Body;
}
}
$Context->Unload();
?>
0
This discussion has been closed.
Comments
i.e. no reaction in one/two weeks and we edit it for you. :-)
Original owner gets sent an updated version of his/her code for future maintenance if so desired.
(of course not just everyone can modify, Mini/Mark makes sense to me)