MyBB Community Forums

Full Version: How can I prevent CSRF in a plugin?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pretty much as the title says... I'm wondering how I can prevent CSRF in a plugin using $mybb->input['my_post_key']

I've been trying to patch a CSRF in a delete function but can't find any examples.

My current requests looks like this:

localhost/admin/index.php?empty=table&my_post_key=
but don't get an actual post key to display after the =

Could someone help me out or point me to some examples please?? Thank you! Rolleyes
It should be:

localhost/admin/index.php?empty=table&my_post_key={$mybb->post_code}
Worked, Thank you!