Skip to content
This repository has been archived by the owner on Sep 19, 2020. It is now read-only.

XSS Sanitation / Protection? #100

Closed
no-stack-dub-sack opened this issue Apr 13, 2017 · 12 comments
Closed

XSS Sanitation / Protection? #100

no-stack-dub-sack opened this issue Apr 13, 2017 · 12 comments

Comments

@no-stack-dub-sack
Copy link
Member

@bonham000 @Bigghead any thoughts?

@firgon000
Copy link

What is the threat?

@no-stack-dub-sack
Copy link
Member Author

@firgon000 I don't know a whole lot about XSS, but @Bigghead mentioned it to me early on in this process. I would think people attempting to write scripts in our text areas where there is actually some room - bio, mentorship bio, etc.

Not sure what could actually be accomplished if someone did...

@bonham000
Copy link
Contributor

Looking for @Bigghead's expertise on this one.

@Bigghead
Copy link
Contributor

I've used something simple like express-sanitizer to get rid of script tags on the server.

Some of the things people can easily do with XSS:

  • On the more harmless side, somebody can just write a setInterval alert script on a page, making it super annoying to load/unusable.

Or

  • A user writes a window.open script that will automatically redirect to a malicious site on page load. Imagine if they got this script saved in their profile page's DB. Everybody that visits their profile gets redirected to a new site.

@Bigghead
Copy link
Contributor

Or Helmet.js.

@bonham000
Copy link
Contributor

bonham000 commented Apr 13, 2017

@Bigghead @no-stack-dub-sack I think React helps sanitize input for us? Like I don't care what script you write in any of our inputs, but it will just show up as that string of text later on...? Try it out on the live demo app if you can window.open anything then we'll need to take a second look. I just tried a few things myself, nothing. Did find another chat bug tho. 😭 💀

@no-stack-dub-sack
Copy link
Member Author

@Bigghead @bonham000

FCC Alumni Network CISO: Shav "Big Head" Parta

@Bigghead
Copy link
Contributor

lolz

@Bigghead
Copy link
Contributor

@bonham000 is right, I just read React helps prevents XSS, as they automatically escape certain html strings in inputs.

@bonham000
Copy link
Contributor

React 👑

@Bigghead
Copy link
Contributor

Bigghead commented Apr 13, 2017

React is freakin awesome. That window.open trick broke my voting app the first time.

I don't think we should worry about XSS injections too much (at all) with this app

@bonham000
Copy link
Contributor

MEEN Stack?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants