A largely incomplete list. One of the most important items would be: handle errors correctly and make sure errors do not result into any sort of resource leak or sensitive information disclosure. For example, this code was from a guy in Stack Overflow: ... function (req, res, next) { if (err) return console.log(err) What will that piece of code do? Leak the request object, the response object, including the underlyin…
> make your server run out of sockets and memory Do you mind explaining why the code causes this?
Web Developer Security Checklist
41–50 of 249 posts
Re: Web Developer Security Checklist
#42While it means well, I think some of this advice is pretty bad, or at least unbalanced. From the very first section: > Encrypt all data at rest in the database ALL data? How are you supposed to query against it then? What does "at rest" even mean in the context of an always-on database? An encrypted partition or something? I'm not even sure what this is supposed to mean and it is certainly not common practise. > Use…
Most database encryption is "transparent", meaning the applications won't even be aware that their database is encrypted. Here is an example:
https://docs.microsoft.com/en-us/sql/relational-databases/se...
Re: Web Developer Security Checklist
#43Earlier quoted context omitted.
> make your server run out of sockets and memory Do you mind explaining why the code causes this?
Because when you handle a request, you need either respond to it or close it. If you don't close it (e.g: res.end, res.send, ...) the connection remains open. Also all the memory allocated for that request stays around without being collected.
Re: Web Developer Security Checklist
#44While it means well, I think some of this advice is pretty bad, or at least unbalanced. From the very first section: > Encrypt all data at rest in the database ALL data? How are you supposed to query against it then? What does "at rest" even mean in the context of an always-on database? An encrypted partition or something? I'm not even sure what this is supposed to mean and it is certainly not common practise. > Use…
>>ALL data? How are you supposed to query against it then? What does "at rest" even mean in the context of an always-on database? An encrypted partition or something? Most database encryption is "transparent", meaning the applications won't even be aware that their database is encrypted. Here is an example: https://docs.microsoft.com/en-us/sql/relational-databases/se...
https://aws.amazon.com/about-aws/whats-new/2015/12/amazon-au...
Re: Web Developer Security Checklist
#45Re: Web Developer Security Checklist
#46Re: Web Developer Security Checklist
#47Re: Web Developer Security Checklist
#48>Use... CloudFlare. lol
Why lol? Not being a douche - I'm genuinely curious why that is a laughable suggestion.
Re: Web Developer Security Checklist
#49Earlier quoted context omitted.
Why lol? Not being a douche - I'm genuinely curious why that is a laughable suggestion.
Cloudflare MITMs your secure connections. If you get the cheaper Cloudflare options, it's really insecure.
An option for many sites is to configure CloudFlare in pass-through mode (no MITM) and then just switch it on when you are being DOS'd.
Re: Web Developer Security Checklist
#50Earlier quoted context omitted.
Why lol? Not being a douche - I'm genuinely curious why that is a laughable suggestion.
Cloudflare MITMs your secure connections. If you get the cheaper Cloudflare options, it's really insecure.
https://blog.cloudflare.com/cloudflare-ca-encryption-origin/