#1394 check csrf comment

This commit is contained in:
Xvezda 2015-07-06 15:18:50 +09:00 committed by bnu
parent c3250bb7a2
commit 89b9ce6ddc

View file

@ -637,10 +637,16 @@ class commentController extends comment
* Fix the comment
* @param object $obj
* @param bool $is_admin
* @param bool $manual_updated
* @return object
*/
function updateComment($obj, $is_admin = FALSE)
function updateComment($obj, $is_admin = FALSE, $manual_updated = FALSE)
{
if(!$manual_updated && !checkCSRF())
{
return new Object(-1, 'msg_invalid_request');
}
if(!is_object($obj))
{
$obj = new stdClass();