Safe submission of data

Discuss the development of future releases of phpBB (phpBB 3.x minor releases) and MODing/Coding related questions.
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
blazes816
Past Contributor
Past Contributor
Posts: 187
Joined: 07 Oct 2006, 03:00
Real name: Tyler
Location: Wichita, Kansas
Contact:

Safe submission of data

Postby blazes816 » 08 Oct 2009, 17:28

I'm working on a MOD that will allow people to rank posts:
[img]http://img207.imageshack.us/img207/7137/modss.png[/img]

(NOTE: It will be prettier when I'm done).

Now, I need to add a row to the new 'vote' table when you click on the appropriate link. What's the best way to safely send this data to the file that will actually do the upload? If I just use a regular link than I am susceptible to CSRF. But if I use a POST form, people could still edit that data on their end, and then POST it.

What do you guys think I should do?
User Number 9e071a3a594a8964cbefe784f8a6afaa94c0de17
My MODs:

User avatar
Obsidian
Supporter
Supporter
Posts: 736
Joined: 13 May 2008, 15:20
Real name: Damian
Contact:

Re: Safe submission of data

Postby Obsidian » 08 Oct 2009, 17:46

I would recommend link hashes. There's some functions in includes/functions.php that could help with that.

blazes816
Past Contributor
Past Contributor
Posts: 187
Joined: 07 Oct 2006, 03:00
Real name: Tyler
Location: Wichita, Kansas
Contact:

Re: Safe submission of data

Postby blazes816 » 08 Oct 2009, 18:07

Thanks! I'll look into it. Although I do think I have a plan, but if that would work better I'll check it out.
User Number 9e071a3a594a8964cbefe784f8a6afaa94c0de17
My MODs:


[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Return to “phpBB Development discussion”

Who is online

Users browsing this forum: No registered users and 4 guests