Is the information gathered by the HTML form secure from the time the user hits submit until it's stored in the database? I know absolutly nothing about this sort of thing, but I'd like to use webform to gather potentially sensative data and I need to know if it's secure. If not, how would I go about making it so?

Great module!

Thanks.

Comments

ullgren’s picture

Assigned: Unassigned » ullgren
Status: Active » Closed (fixed)

At a glance this is a simple question but the more I think about it ... it gets more and more complecated. The security of the submitted data is depending on several diffrent variables (as is almost allways the case when it comes to security).

The form data is submitted using HTTP POST. By default this means that the information is transmitted in clear text over the net. To secure your communication configure your webserver to use HTTPS (also kown as HTTP over SSL or TLS). Consult the webserver documentation on how to achive this.
If you (like me) use apache I would suggest http://httpd.apache.org/docs/2.0/mod/mod_ssl.html
In any case if a intruder get locale (or shell) access to your webserver machine they can just log all submissions either by changing the webserver config, adding modules into the webserver or by changing the PHP code. This could also be done by exploiting a vurnability in any script or other application hosted on the same webserver.

The data is then stored in the database. Depending on your configuration this might also include transmiting the data in clear text between the webserver and the database server. If you, like me, use MySQL I would suggest a look at http://dev.mysql.com/doc/refman/4.1/en/secure-connections.html

After this the data is stored in the database. A intruder that gets locale (or shell) access to the database server can most likely get access the raw database files and get the data from there.

So to conclude if you have a dedicated server for both your database and webserver and you set them up to use secure connection. You will probably be quite secure aslong as you keep up with the security patches, trust your admins and have good routines when it comes to security in general (such as password length/complexity, not using any unsecure protocols to login on your accounts and so on).

If you are on a shared hosting service I would NOT recomend you to store sensitive information of any kind in either php files, config files, databases, email accounts etc.