[wp-trac] [WordPress Trac] #33621: If FORCE_SSL_ADMIN is true, the scheme of the siteurl option should reflect this

WordPress Trac noreply at wordpress.org
Tue Sep 1 23:01:08 UTC 2015


#33621: If FORCE_SSL_ADMIN is true, the scheme of the siteurl option should reflect
this
--------------------------------------+------------------------------
 Reporter:  johnbillion               |       Owner:
     Type:  defect (bug)              |      Status:  new
 Priority:  normal                    |   Milestone:  Awaiting Review
Component:  Administration            |     Version:  3.0
 Severity:  normal                    |  Resolution:
 Keywords:  needs-patch dev-feedback  |     Focuses:
--------------------------------------+------------------------------

Comment (by peterwilsoncc):

 Replying to [comment:4 johnbillion]:
 > Can you provide some examples? If a resource is using `siteurl` (via
 `get_option('siteurl')` instead of `home_url()` or `site_url()`) then it's
 doing it wrong, and it's currently receiving a URL with an incorrect
 scheme anyway.

 This is part of the reason for my ambivalence, the option's scheme is
 benign as it's overridden in `site_url`. Changing the value on save could
 confuse the user for no reason, especially if they expect home & site URLs
 to match.

 > > What is the advantage of overriding the setting in the DB rather than
 when `true === is_admin()`?
 >
 > The main reason I'm proposing this is that it's possible for a user to
 change the scheme of the `siteurl` option on the General Settings screen
 anyway. This means that for sites with `FORCE_SSL_ADMIN` set to true,
 there's disparity between those with a `siteurl` option that has an
 `https` scheme and those with an `http` scheme.

 > In addition, a site which was installed over (and runs exclusively on)
 HTTPS contains an https scheme in its siteurl option. This is correct, and
 should be the case for all sites that use https for the admin area,
 regardless of the front end scheme.

 Both `siteurl` and `homeurl` are set to HTTPS in this instance, as it's
 benign I think consistent rules for both are more user friendly.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/33621#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list