[wp-trac] [WordPress Trac] #47817: Using file editor ignores schema and always uses http

WordPress Trac noreply at wordpress.org
Sat Mar 11 03:26:19 UTC 2023


#47817: Using file editor ignores schema and always uses http
-------------------------------+------------------------------
 Reporter:  jeffpaulkinsta     |       Owner:  (none)
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  Filesystem API     |     Version:  5.2.2
 Severity:  normal             |  Resolution:
 Keywords:  reporter-feedback  |     Focuses:  administration
-------------------------------+------------------------------
Changes (by costdev):

 * keywords:   => reporter-feedback


Comment:

 - [https://github.com/wordpress/wordpress-
 develop/blob/12e7ff1571e2cfdef7e26f158fa91d7814c64d33/src/wp-
 admin/includes/file.php#L558-L571 The loopback request] uses `admin_url()`
 for the URL.
 - `admin_url()` in turn calls `get_admin_url()` with the `$scheme` set to
 `admin`.
 - `get_admin_url()` calls `get_site_url()`, passing `$scheme`.
 - `get_site_url()` calls `set_url_scheme()`, passing `$scheme`.
 - `set_url_scheme()` sets the scheme based on the following condition:
 {{{#!php
 <?php

 if ( 'admin' === $scheme || 'login' === $scheme || 'login_post' ===
 $scheme || 'rpc' === $scheme ) {
         $scheme = is_ssl() || force_ssl_admin() ? 'https' : 'http';
 }}}
 - `is_ssl()` returns `true` if:
   - `$_SERVER['HTTPS']` is set to `'on'`, OR
   - `$_SERVER['HTTPS']` loosely evaluates to `'1'`, OR
   - `$_SERVER['SERVER_PORT']` is `443`.
 - `force_ssl_admin()` returns `true` if it has previously been called as
 `force_ssl_admin( true )`.

 -----

 > a user's SSL intermediate chain was missing

 This may suggest that the user's SSL certificate was invalid, and should
 have produced an error about an incomplete chain. Can you clarify whether
 or not this was the case?

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


More information about the wp-trac mailing list