]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/login.php
Redirect to https when making an http request for a sensitive action
[quix0rs-gnu-social.git] / actions / login.php
index 07c601a4dba7aa70d6254e02713a5ab55f980cd2..103df7ee5ad59a53b51e69b3a72ee6fa9774c054 100644 (file)
@@ -62,28 +62,6 @@ class LoginAction extends Action
         return false;
     }
 
-    /**
-     * Prepare page to run
-     *
-     *
-     * @param $args
-     * @return string title
-     */
-
-    function prepare($args)
-    {
-        parent::prepare($args);
-
-        // @todo this check should really be in index.php for all sensitive actions
-        $ssl = common_config('site', 'ssl');
-        if (empty($_SERVER['HTTPS']) && ($ssl == 'always' || $ssl == 'sometimes')) {
-            common_redirect(common_local_url('login'));
-            // exit
-        }
-
-        return true;
-    }
-
     /**
      * Handle input, produce output
      *