summaryrefslogtreecommitdiff
path: root/actions/register.php
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2010-05-19 12:51:25 -0700
committerBrion Vibber <brion@pobox.com>2010-05-19 12:51:25 -0700
commit7005ef66617b265ddccdd9082c2368bf014a7e83 (patch)
tree52f853c4d47063f0af488a7ff5fb52df50b430bb /actions/register.php
parent48dc899acb9a0ac87140353092dab1f5e67753d8 (diff)
parenta39a934dd4a133bad6e76fa9a5018cedcb70225c (diff)
Merge branch 'testing' into 0.9.x
Conflicts: plugins/OpenID/openidlogin.php
Diffstat (limited to 'actions/register.php')
-rw-r--r--actions/register.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/actions/register.php b/actions/register.php
index 9b8161e08..7307bc689 100644
--- a/actions/register.php
+++ b/actions/register.php
@@ -74,6 +74,13 @@ class RegisterAction extends Action
parent::prepare($args);
$this->code = $this->trimmed('code');
+ // @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('register'));
+ // exit
+ }
+
if (empty($this->code)) {
common_ensure_session();
if (array_key_exists('invitecode', $_SESSION)) {