Skip to:
Content

bbPress.org


Ignore:
Timestamp:
07/02/2008 02:53:07 PM (17 years ago)
Author:
sambauers
Message:

bb_uri() and bb_get_uri() commit bomb.

BB_URI_CONTEXT_* definitions applied to all link creation functions and passed to their filters.

First stages of SSL support for user forms (login, registration, etc.) and admin area.

Links rewritten for SSL at this stage, but pages are not yet forced to SSL if loaded as non-secure.

bb_force_ssl_user_forms() and bb_force_ssl_admin() also included.

Introducing new config constants, BB_FORCE_SSL_USER_FORMS and BB_FORCE_SSL_ADMIN.

New config variable $bb->uri_ssl, a complete URI for the SSL links to go to. If not set it is based on replacing http with https in $bb->uri.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bb-includes/pluggable.php

    r1562 r1575  
    55    if ( !wp_validate_auth_cookie() ) {
    66        nocache_headers();
    7         header('Location: ' . bb_get_option('uri'));
     7        header('Location: ' . bb_get_uri(null, null, BB_URI_CONTEXT_HEADER));
    88        exit();
    99    }
     
    192192
    193193    $lp  = parse_url($location);
    194     $wpp = parse_url(bb_get_option('uri'));
     194    $wpp = parse_url(bb_get_uri());
    195195
    196196    $allowed_hosts = (array) apply_filters('allowed_redirect_hosts', array($wpp['host']), isset($lp['host']) ? $lp['host'] : '');
    197197
    198198    if ( isset($lp['host']) && !in_array($lp['host'], $allowed_hosts) )
    199         $location = bb_get_option('uri');
     199        $location = bb_get_uri(null, null, BB_URI_CONTEXT_HEADER);
    200200
    201201    wp_redirect($location, $status);
     
    412412    if (!count(preg_grep('/^from:\s/im', $headers))) {
    413413        if (!$from = bb_get_option('from_email'))
    414             if ($uri_parsed = parse_url(bb_get_option('uri')))
     414            if ($uri_parsed = parse_url(bb_get_uri()))
    415415                if ($uri_parsed['host'])
    416416                    $from = 'bbpress@' . trim(preg_replace('/^www./i', '', $uri_parsed['host']));
Note: See TracChangeset for help on using the changeset viewer.