CORE-POS / IS4C

Cooperative Operational Retail Environment
http://www.core-pos.com
GNU General Public License v2.0
63 stars 44 forks source link

Use unique hidden token field for each form on page #1166

Closed lgedgar closed 1 year ago

lgedgar commented 1 year ago

don't insert same element on multiple forms

Stumbled across this problem by accident but I think it may be worth fixing? With fannie/batches/newbatch/EditBatchPage.php displayed in browser, there were 3 forms on page but the one for adding an item to batch did not have a token field. That particular form uses GET anyway, so no CSRF token technically needed I think.

But this code change did seem to fix the issue anyhow; token field was added to all 3 forms okay.