Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2009
    Posts
    402
    Plugin Contributions
    0

    Default Secure non secure issues

    Is this true also for zc 1.5.1?
    dr. Byte said:
    Zen Cart v1.3.x currently checks for the following conditions based on $_SERVER variables available to PHP. If any of these tests passes, Zen Cart treats the page as SSL:
    HTTPS = 'on' or '1'
    HTTP_X_FORWARDED_BY = 'SSL'
    HTTP_X_FORWARDED_HOST = 'SSL' (and v1.4 and newer will check whether this matches the HTTPS_SERVER name too)
    SCRIPT_URI is passed and contains 'https:'
    SERVER_PORT = 443

    (this all depends on ENABLE_SSL being set to 'true' in your configure.php file, which you've already confirmed to be the case)
    thanks.
    enzo

  2. #2
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,892
    Plugin Contributions
    96

    Default Re: Secure non secure issues

    Here's the code fragment (from /includes/init_includes/init_file_db_names.php) that determines SSL vs. NONSSL based on $_SERVER parameters:
    Code:
    $request_type = (((isset($_SERVER['HTTPS']) && (strtolower($_SERVER['HTTPS']) == 'on' || $_SERVER['HTTPS'] == '1'))) ||
                     (isset($_SERVER['HTTP_X_FORWARDED_BY']) && strpos(strtoupper($_SERVER['HTTP_X_FORWARDED_BY']), 'SSL') !== false) ||
                     (isset($_SERVER['HTTP_X_FORWARDED_HOST']) && (strpos(strtoupper($_SERVER['HTTP_X_FORWARDED_HOST']), 'SSL') !== false || strpos(strtoupper($_SERVER['HTTP_X_FORWARDED_HOST']), str_replace('https://', '', HTTPS_SERVER)) !== false)) ||
                     (isset($_SERVER['SCRIPT_URI']) && strtolower(substr($_SERVER['SCRIPT_URI'], 0, 6)) == 'https:') ||
                     (isset($_SERVER['HTTP_X_FORWARDED_SSL']) && ($_SERVER['HTTP_X_FORWARDED_SSL'] == '1' || strtolower($_SERVER['HTTP_X_FORWARDED_SSL']) == 'on')) ||
                     (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && (strtolower($_SERVER['HTTP_X_FORWARDED_PROTO']) == 'ssl' || strtolower($_SERVER['HTTP_X_FORWARDED_PROTO']) == 'https')) ||
                     (isset($_SERVER['HTTP_SSLSESSIONID']) && $_SERVER['HTTP_SSLSESSIONID'] != '') ||
                     (isset($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] == '443')) ? 'SSL' : 'NONSSL';

  3. #3
    Join Date
    Jul 2009
    Posts
    402
    Plugin Contributions
    0

    Default Re: Secure non secure issues

    Thank a lot.
    enzo

 

 

Similar Threads

  1. Authorize.net SIM v1.3.9h Secure/Non-Secure content error
    By KevinH in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 6 Oct 2012, 05:15 PM
  2. This page contains both secure and non-secure items?
    By doubletiger in forum General Questions
    Replies: 2
    Last Post: 11 Sep 2010, 01:16 PM
  3. Replies: 1
    Last Post: 7 May 2009, 09:06 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg