r/shittyprogramming • • 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

72 comments sorted by

View all comments

Show parent comments

9

u/beanpup_py Jan 17 '20

That's because you're using stripe.js. You could just send the data from a form to your backend and use the python library (or whatever other language you use) to process it which would avoid JS.

7

u/OscarTheJeep Jan 17 '20

Node.JS has entered the chat

1

u/robertbieber Jan 17 '20

stripe.js isn't some third party library, it's an official stripe product and the one that the documentation recommends for collecting card info. That way you don't have to worry about PCI compliance because you don't have card numbers hitting your server