my Fortify scan is complaining about saving unvalidated data to cookie. To be exact it does not like that I use window.location.hostname directly when saving to cookie. Is is false positive? Do I really need to encode window.location.hostname like in example below?
window.location.hostname
const encodedHostname = encodeURI(window.location.hostname);
2.1m questions
2.1m answers
60 comments
57.0k users