3

A Content-Type header is applicable to a response with a body per RFC 2616: When an entity-body is included with a message, the data type of that body is determined via the header fields Content-Type and Content- Encoding. By extension, it's not necessary if there is no response body, as you're describing. It is a SHOULD and not a MUST, so it is RFC-...


2

The decisive factors here are isolation and the principle of least privilege. If the account used for the website has access to the database containing the customer records, any compromise on the website is automatically a compromise on the customer records, too. Furthermore, the data could be isolated on a separate server or even a separate network, and ...


1

This is making a prepared statement. It won't sanitize the inputs. At a low level, it's probably using the sqlite c api, and it would look something like: stmnt = sqlite3_prepare("INSERT INTO table (e1, e2) VALUES(?, ?)") sqlite3_bind_int(stmnt,0,V1) sqlite3_bind_blob(stmnt,1,V1) while((row = sqlite3_step(stmnt) != SQLITE_DONE){ //do something ...


1

Cloudflare is essentially a reverse proxy which might also cache content. If the content is then actually served from the cache or if the request is passed through the origin server can be influenced by the server itself through the use of standard Cache-Control HTTP headers. Thus, if the server wants to control access to specific content but still allow ...


1

It depends on what you mean by "the best". From the security point of view, server should not trust any data received from the client and should validate all the data. Why? Because you don't know who and why sent these data. May be user has modified your JavaScript and forced browser to send to the server the data, that you believed your script ...


1

Like everything, it is partly safe and partly risky. It's safe because your application is the only thing other people can get access to. It's also unsafe because other people can get access to your application. If there's a security bug in your application, it might allow people to get access to things they're not supposed to access. You say that your ...


1

It is not safe. Simply port forwarding internet traffic to an application running in your local network essentially exposes your full internal network to some attacker in case of a bug in the application. And bugs are likely. If the server application is instead located at some hosting provider on the public internet it will not have access to your internal ...


Only top voted, non community-wiki answers of a minimum length are eligible