Closed (fixed)
Project:
Page Syndication
Version:
6.x-1.0-alpha1
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Reporter:
Created:
7 Jul 2010 at 14:11 UTC
Updated:
9 Jul 2010 at 08:34 UTC
The admin/settings/page_syndication/referer_blacklist/remove/%-path should be protected against CSRF attacks by using a token or confirmation form. Otherwise authorized users can be tricked into unknowingly removing blacklisted referrers.
$items['admin/settings/page_syndication/referer_blacklist/remove/%'] = array(
'page callback' => 'remove_referer',
'page arguments' => array(5),
'access arguments' => array('administer site configuration'),
'file' => 'page_syndication.admin.inc'
);
function remove_referer($id) {
db_query('DELETE FROM {page_syndication_referer_blacklist} WHERE id=%d', $id);
drupal_goto('admin/settings/page_syndication/referer_blacklist');
}
Comments
Comment #1
tudor.sitaru commentedThanks for the find, a confirmation page will be added.
Comment #2
tudor.sitaru commentedFixed in HEAD, will be part of the ALPHA2 release.
Comment #3
tudor.sitaru commentedALPHA2 was released with the fix, closing the ticket.