CSRF protection

hickory - July 14, 2008 - 15:02
Project:Taxonomy API and REST interface
Version:5.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

Is there anything that stops a malicious page from deleting/adding taxonomy terms using CSRF?

#1

the greenman - July 14, 2008 - 16:43

The code is (now) checking $_SERVER['HTTP_REFERER'] to attempt to make sure that we are receiving updates from our actual server.

Thanks for the headsup. We had not quite looked into this in too much detail because an attack would require knowledge of the node and tids owned by the user on our site.

I'll look into better ways to secure against this.

#2

the greenman - July 15, 2008 - 16:21
Status:active» fixed

I have now added token based security for updates. A token needs to be submitted with each request, and this is bound to the nid of the effected node.

I dont really think I can make this any better, so will close the issue.

Thanks very much for the heads up.

#3

tjholowaychuk - July 15, 2008 - 16:23

Does core have js token functionality yet? if not it probably should for cases like this, or a unified Ajax controller

#4

the greenman - July 17, 2008 - 10:36
Version:» 5.x-1.x-dev

I have not yet had the chance to sit down and implement AJAX stuff in detail yet. I designed this so that, when the time came, I could add JS interaction. So, I will have to do some exploring.

#5

hickory - July 21, 2008 - 11:26

"Does core have js token functionality yet?"

Tokens for GET requests, avoiding the need for confirmation pages, would be very useful (on 'logout' links, for example).

#6

Anonymous (not verified) - August 4, 2008 - 11:26
Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.