diff options
author | Brion Vibber <brion@pobox.com> | 2010-05-19 12:51:25 -0700 |
---|---|---|
committer | Brion Vibber <brion@pobox.com> | 2010-05-19 12:51:25 -0700 |
commit | 7005ef66617b265ddccdd9082c2368bf014a7e83 (patch) | |
tree | 52f853c4d47063f0af488a7ff5fb52df50b430bb /actions/login.php | |
parent | 48dc899acb9a0ac87140353092dab1f5e67753d8 (diff) | |
parent | a39a934dd4a133bad6e76fa9a5018cedcb70225c (diff) |
Merge branch 'testing' into 0.9.x
Conflicts:
plugins/OpenID/openidlogin.php
Diffstat (limited to 'actions/login.php')
-rw-r--r-- | actions/login.php | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/actions/login.php b/actions/login.php index dc6352368..d3e4312f7 100644 --- a/actions/login.php +++ b/actions/login.php @@ -63,6 +63,28 @@ class LoginAction extends Action } /** + * 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 * * Switches on request method; either shows the form or handles its input. |