- 0
HTML data-* security
-
Recently Browsing 0 members
- No registered users viewing this page.
-
Similar Content
-
Google to discontinue the Basic HTML version of Gmail next year
By Chasethebase,
- 1 reply
- 14 views
-
Get this Price Dropped Coding 101 Bootcamp Beginners Bundle for only $24.99
By News Staff,
- zenva academy
- coding 101
- (and 11 more)
- 1 reply
- 9 views
-
Bid under $10 for this full Superstar Web Development & Design Bundle
By News Staff,
- neowin deals
- pay what you want
- (and 12 more)
- 0 replies
- 10 views
-
This Master Learn to Code 2021 Certification Bundle is Price Dropped to just $20
By News Staff,
- neowin deals
- online courses
- (and 18 more)
- 0 replies
- 6 views
-
Pay What You Want for a 20-Course Programming Bundle
By News Staff,
- neowin dewals
- pay what you want
- (and 17 more)
- 0 replies
- 7 views
-
Question
xWhiplash
I have a question about the security of the data-* attributes in HTML. Lets say we have some AJAX function that uses a product ID of an item. I am trying to keep my javascript separate from my HTML. So I would do something like this:
With jQuery, I would then do this:
So I validate the user input, but how can I validate that the specific product has that valid ID? What is preventing somebody from using one of the many developer tools and changing data-productid to 8 or some other integer?
Link to comment
https://www.neowin.net/forum/topic/1218851-html-data-security/Share on other sites
6 answers to this question
Recommended Posts