File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -38,10 +38,7 @@ public function handleRedirect(WP_REST_Request $request)
3838    {
3939        $ state$ requestget_param ('state ' );
4040
41-         $ state_hoststatic ::getHostWithPort (wp_parse_url ($ state
42-         $ site_hoststatic ::getHostWithPort (wp_parse_url (get_site_url ()));
43- 
44-         if  ($ state_host$ site_host
41+         if  (static ::getHostWithPort ($ statestatic ::getHostWithPort (get_site_url ())) {
4542            return  new  WP_Error ('404 ' );
4643        }
4744
@@ -53,8 +50,10 @@ public function handleRedirect(WP_REST_Request $request)
5350        }
5451    }
5552
56-     public  static  function  getHostWithPort ($ parsed_url 
53+     public  static  function  getHostWithPort ($ url 
5754    {
55+         $ parsed_urlwp_parse_url ($ url
56+ 
5857        return  $ parsed_url'host ' ] . (empty ($ parsed_url'port ' ]) ? null  : (': '  . $ parsed_url'port ' ]));
5958    }
6059}
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments