Greetings all,
Well, you guys are my last hope. I had a mod written for me last year, my forum members love it and at the moment it's running but when I upgrade I don't expect it to survive..so I'm trying to get a handle on this so that I can do it myself. The coder has long since disappeared so help is appreciated.
The beginning of this thread says that:
"To opt your entire file into CSRF protection the following should be added to the top of the file under the define for THIS_SCRIPT."
I have this line at the beginning of my mods .php file:
define('THIS_SCRIPT', 'dataawards_awards');
Do I add this:
define('CSRF_PROTECTION', true);
Directly below that line? will that solve the entire security token issue or do I need to hunt for form/posts? Talking about form/posts...is this one?:
$awarddisplay.= '<form action="' . htmlentities($_SERVER['PHP_SELF']) . '?addawards=' . $_REQUEST['addawards'] . '&type=' . $type . '" method="POST">';
If I understand this correctly I need to find all form/posts (since you are posting and not requesting, thus the need for the security token):
<input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
Thanks, I hope I can work through this on my own, but if anyone wants to make some money, I'd rather pay to have it done..PM if interested.
|