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/robertbieber Jan 18 '20
I mean, yes, but most of the time the difference is that the third party stuff is better written and much better tested than whatever someone hacked up in house
We're talking about a colleague here, not some rando asking you to add something to your site.
Being smart about what JavaScript you add makes perfect sense. Purposely degrading the functionality of your checkout page because you have an irrational fear of JavaScript, however, is just straight cargo cult nonsense. Especially given that the alternative is POSTing PCI sensitive payment data directly to your own servers where, congrats, now you're responsible for it and the fallout of any data breach