Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Friday, November 13, 2026

Diff for Metafox/subst.inc.php between version 1.39 and 1.40

version 1.39, 2008/04/10 10:08:53 version 1.40, 2008/05/02 15:55:33
Line 17 
Line 17 
  * http://platon.sk/projects/Metafox/   * http://platon.sk/projects/Metafox/
  */   */
   
 /* $Platon: Metafox/subst.inc.php,v 1.38 2007-12-31 13:45:40 nepto Exp $ */  /* $Platon: Metafox/subst.inc.php,v 1.39 2008-04-10 10:08:53 nepto Exp $ */
   
 require_once 'cfgldr.inc.php';  require_once 'cfgldr.inc.php';
 require_once 'error.inc.php';  require_once 'error.inc.php';
Line 50  ezin_cgi_parse();
Line 50  ezin_cgi_parse();
  * Mandatory HTTP host check   * Mandatory HTTP host check
  */   */
   
   if ($ezin_cgi['output'] == 'admin'
                   && strcasecmp($_SERVER['HTTPS'], 'on')
                   && strlen($_SERVER['HTTP_HOST']) > 0) {
           $socket = @fsockopen('ssl://'.$_SERVER['HTTP_HOST'], 443);
           if (is_resource($socket)) {
                   $req_str = "HEAD / HTTP/1.1\r\n";
                   $req_str .= "Host: $_SERVER[HTTP_HOST]\r\n";
                   $req_str .= "Connection: close\r\n\r\n";
                   fwrite($socket, $req_str);
                   stream_set_blocking($socket, true);
                   stream_set_timeout($socket, 1);
                   $data = fread($socket, 100);
                   if (preg_match('/^HTTP.*\s*200\s*/', $data)) {
                           Platon::redirect('https://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']);
                   }
           }
   }
   
 if (strlen($ezin_cfg['http_host_redirect']) > 0 && strcasecmp($_SERVER['REQUEST_METHOD'], 'POST')) { /* {{{ */  if (strlen($ezin_cfg['http_host_redirect']) > 0 && strcasecmp($_SERVER['REQUEST_METHOD'], 'POST')) { /* {{{ */
         $ezin_http_host    = strtolower($_SERVER['HTTP_HOST']);          $ezin_http_host    = strtolower($_SERVER['HTTP_HOST']);
         $ezin_redirect_ar  = preg_split('|\s+|', $ezin_cfg['http_host_redirect']);          $ezin_redirect_ar  = preg_split('|\s+|', $ezin_cfg['http_host_redirect']);

Legend:
Removed from v.1.39  
changed lines
  Added in v.1.40

Platon Group <platon@platon.org> http://platon.org/
Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top