r/shittyprogramming • u/mikaey00 • Jan 16 '20
JavaScript: it's a security risk
Overheard on a call one of my colleagues just got off of:
Colleague: "So why aren't you able to add our JavaScript to your checkout page?"
Client: "Oh, we disable JavaScript on our entire checkout page."
Colleague: "...why?"
Client: "It's a security risk."
Colleague: <head explodes>
136
Upvotes
View all comments
Show parent comment
1
u/shatteredarm1 Jan 17 '20
Not really. Integrity check just prevents the browser from running JS if it doesn't match the expected hash. That doesn't defeat the purpose of not hosting your own JS - you can still use a CDN, or link to a 3rd party URL. If they're making changes to that JS file, they need to version it.