[wp-trac] [WordPress Trac] #46453: REQUEST_URI doesn't contain http string for ssl validation

WordPress Trac noreply at wordpress.org
Sat Mar 9 07:04:12 UTC 2019


#46453: REQUEST_URI doesn't contain http string for ssl validation
--------------------------+-----------------------------
 Reporter:  LogixTree     |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  5.1
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 Hi guys,
 I just came around very strange issue. I have been looking at the
 following code.
 {{{#!php
 <?php
 if ( force_ssl_admin() && ! is_ssl() ) {
         if ( 0 === strpos( $_SERVER['REQUEST_URI'], 'http' ) ) {
                 wp_safe_redirect( set_url_scheme( $_SERVER['REQUEST_URI'],
 'https' ) );
                 exit();
         } else {
                 wp_safe_redirect( 'https://' . $_SERVER['HTTP_HOST'] .
 $_SERVER['REQUEST_URI'] );
                 exit();
         }
 }
 }}}

 Clearly, We are looking for http string to find out if it's ssl or not.
 But under the PHP config. We don't have any http or https string.
 [[Image(https://logixtree.in/wp-
 content/uploads/2019/03/Screenshot_127.png)]]

 Whenever we try to login. It just hang on redirects and end up many
 redirect.
 I tried bypass by adding filter
 {{{#!php
 <?php
 add_filter('secure_auth_redirect', '__return_false');
 }}}

 But seems like same coding is under wp-login.php.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/46453>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list