************************************************************************* * * * BUGGER V2 * * * * Changes to Authentication Processing * * * * Document Date: 19 June 2011 * * * ************************************************************************* Introduction ------------- The way that BUGGER handles authentication and other sensitive data has changed as of tonight's nightly build (V2.4a). Data is still sent via POST, but not all processing happens on the immediate landing page. Wherehas login data was originally POST'd to and processed by login.php, the browser is now passed between a number of pages. This is as a result of complications thrown up by the use of a shared SSL certificate on JustHost web hosting. Because of the way their shared server is configured, it's not possible to simply pre-pend https to a web address. Instead, the site must be accessed using a completely different URL which will cause problems with the SESSION Cookie. As an example, where BUGGER might be accessed on http://www.bentasker.co.uk/BUGGER to access via SSL we would need to access https://cx78.justhost.com/~bentask/. As a result the SESSION cookie would be set for cx78.justhost.com and so would not be retrievable when the user is returned back to bentasker.co.uk. Old Process Flow ----------------- - User accesses the login form and submits their details - Sent to login.php (using SSL where possible) - login.php processes and validates the credentials - If valid, sets relevant SESSION variables New Process ------------ - User accesses the login form and submits their details - Sent using SSL to login.php using the shared cert URL - login.php processes and validates the credentials - If valid, Adds an authentication record to the newly created Authtokens table. - Sends a HTTP Redirection to login2.php, submitting the token value and submitted username as part of the request URI - login2.php uses the values in the request URI to retrieve the authtoken from the database. These values are then validated, and if they match up the SESSION variables are set. On most servers, this process is unnecessary and a config override will be added to prevent unnecessary read/writes to the database. All functions submitting/receiving passwords have been updated to use this process flow. Functionality updated ---------------------- - Add User form - Set Backup Retrieval Password ************************************************************************* * * * DOCUMENT END * * Copyright (C) B Tasker 2011 * * * *************************************************************************