Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Also, sanitization does not mean that you should block the user from inputting text. I don't know what kind of application you are developing but what if someone needs to input a simple math equation for example? That could possibly be executed by the eval function and blocked because your server will think it is js. Also remember that if you display user submitted text on a website. You are going to want to sanitize html/css as well.
Rule 34 of nodejs states that if you can imagine it, there is a module for it. You can probably just install a sanitization module if you're unsure about how to sanitize input. -
Filtering user inputs is extremely important. The worst case scenario I've seen (I was the hacker (ethical, had permission)) was using an XSS flaw (not sanitizing user input resulting in arbitrary JavaScript execution on the web page) to hijack a super admin account. Took me about 15-30 seconds :)
-
leo28071087y@linuxxx in one web application, there was plain xss in the messaging system, it had a send-all feature. 😕😲
The only thing holding me back was client-side validation in the tinyMCE editor. They used a plaintext editor in their app, leading me to discover this bug.
Guess I should never use PHP.
(I reported it ofc) -
@leo2807 What does this have to do with PHP? This was just bad server side validation, nothing to do with the programming language :)
-
leo28071087y@linuxxx sure, but it seems they regretted it, and now they run some weird hybrid system. You're right that it has nothing to do with this tho.
Related Rants
-
vadimg24Close relative: Hey, what is my gmail password? Me: I have no idea. Him: but you created the gmail account for...
-
IDontGiveADuck45My coworker insists that: if (x == true) Is better than: if (x) I'm losing my mind. Send Help.
-
ax1s3After opening the legacy code and finding out that the entire shit has 15000+ LOC and without proper comments
I heard I should not allow users to inject arbitrary text into my webpage without sanitizing it. Is it a clean solution to just eval it on the (node) server, and if it runs not post it because it's obviously JS and not just text?
Any opinions on that?
rant
please help
revolutionary idea