I understand that the Django's comments framework was designed for anonymous public comments like you commonly see below a blog or an artcile. In other words, anyone can post comments.
I am using the comments framework for only allowing logged in users to display comments. What I did was modify the form.html
and hid the name
, URL
, and email
field (leaving the security fields intact). So pretty much the user only sees a comment
field. I wanted to use Django's comments since it already has some nice security features like timestamp check, honeypot field, and anti-double-posting features. The user information is grabbed from the request.user
RequestContext and I get the user information about the comment by comment.user.get_full_name
as oppose to comment.name
or comment.user.email
vs comment.email
.
I also start to read up about Django's CSRF protection. In most cases, people talk about how CSRF prevent hackers to, say, transfer money from a logged in user's bank account by using their cookie or something.
In my case, does CSRF prevent people from posting as other users? In other words, can a hacker create their own POST form and post under a different user.pk
to fake other people?