? Pending

User tests: Successful: Unsuccessful:

avatar andrepereiradasilva
andrepereiradasilva
14 May 2016

Pull Request for Improvement.

Summary of Changes

This PR is for adding a new method isHttpsForced to JApplicationCms.

This method can be used to check if the current (or given) client is configured (in the global config) to force HTTPS usage.

Please note this is different from JApplicationWeb::isSSLConnection() that does a very different thing (uses the server environment variables to check if the current page is served trough HTTPS).

This PR also, as a PoC, applies this method to determining if the session cookie should be a secure cookie or not, replacing the old similiar code.

Testing Instructions

To check this method is working.

Code review, or:

Apply patch

For admin client (backend)
  • Go to isis index.php file and after defined('_JEXEC') or die; add:
$app = JFactory::getApplication();
$app->enqueueMessage($app->isHttpsForced() ? 'HTTPS is forced' : '', 'notice');
  • Load any backend page. It will now give a "HTTPS is forced" message if you have "Force HTTPS" in global config set to "Entire Site" or "Administrator Only"
For site client (frontend)
  • Add the same code above but now to protostar index.php file
  • Load any frontend page. It will now give a "HTTPS is forced" message if you have "Force HTTPS" in global config set to "Entire Site"
avatar andrepereiradasilva andrepereiradasilva - open - 14 May 2016
avatar andrepereiradasilva andrepereiradasilva - change - 14 May 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 14 May 2016
Labels Added: ?
avatar andrepereiradasilva andrepereiradasilva - change - 14 May 2016
The description was changed
avatar andrepereiradasilva andrepereiradasilva - change - 14 May 2016
The description was changed
avatar andrepereiradasilva andrepereiradasilva - change - 14 May 2016
The description was changed
avatar andrepereiradasilva andrepereiradasilva - change - 14 May 2016
The description was changed
avatar andrepereiradasilva andrepereiradasilva - change - 14 May 2016
The description was changed
avatar andrepereiradasilva andrepereiradasilva - change - 14 May 2016
The description was changed
avatar andrepereiradasilva andrepereiradasilva - change - 14 May 2016
The description was changed
avatar andrepereiradasilva andrepereiradasilva - change - 15 May 2016
The description was changed
avatar brianteeman brianteeman - change - 15 May 2016
Category Libraries
avatar andrepereiradasilva
andrepereiradasilva - comment - 5 Sep 2016

closing for last of interest

avatar andrepereiradasilva andrepereiradasilva - change - 5 Sep 2016
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2016-09-05 21:55:39
Closed_By andrepereiradasilva
avatar andrepereiradasilva andrepereiradasilva - close - 5 Sep 2016

Add a Comment

Login with GitHub to post a comment