| |||||||
This is a discussion on Defining CSRF Protection within the vBulletin section, part of the Internet Forum Softwares category; in global.php, I find the following section of code: PHP Code: // ############################################################################# // get style variables $stylevar = fetch_stylevars ( $style , $vbulletin ...
![]() |
|
| | LinkBack | Thread Tools | Display Modes |
|
#1
| ||||
| ||||
|
in global.php, I find the following section of code: PHP Code: I want to know where CSRF_ERROR gets defined. It is not defined directly in global.php, so it must be defined elsewhere - possibly in the function "fetch_stylevars"? Where is that function found? Can you tell me where this constant gets defined, after what checks. If you can direct me to a location where I can read the code that would be good enough. Thanks in advance. |
|
#2
| ||||
| ||||
|
You need to define it in YOUR files. And you also need to add a hidden field in the POST form in the associated template. Its important to check for CSRF protection in your forms and is quite simple to implement as well. Adding Protection to your own files 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. PHP Code: The following should be added to all of the forms which POST back to vBulletin or a vBulletin script. This will automatically be filled out with a 40 character hash that is unique to the user. HTML Code: <input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" /> Read Create your own vBulletin-Powered page and go through the code. Hope this helps
__________________ Would you like to Link To Us | Support TECH6 by going Premium Know more about me at Vinayaks.com | Follow TECH6 at Twitter |
![]() |
| Bookmarks |
| Tags |
| csrf protection |
| Thread Tools | |
| Display Modes | |
| |