Thread: Cookies

Results 1 to 7 of 7
  1. #1
    Join Date
    Nov 2007
    Location
    Woodbine, Georgia, United States
    Posts
    4,014
    Plugin Contributions
    61

    Default Cookies

    THIS IS CROSS POSTED FOR CLARITY

    I am recently getting a bunch of reports for

    Details: SSL/TLS: Missing `secure` Cookie Attribute (NVT:1.3.6.1.4.1.25623.1.0.902661)
    Version used: $Revision: 4686 $
    References:CVSS v2 Vector: (Av:n/ac:l/au:n/c/i/a:n)
    CVE: NOCVE
    BID: NOBIDCERT:XREF:
    URL:http://www.ietf.org/rfc/rfc2965.txt,...(OWASP-SM-002)

    I have already supplied them this page https://www.zen-cart.com/content.php?317-cookies

    I have received this fail from Carts 1.54 & PHP 5.6 as well as carts 1.5.5F & PHP 7.1.

    My question is, since it seems to be raining these, is there a way to change the carts so that they are setting the 'secure' attribute?

    ###
    I located the following in includes/init_includes/init_sessions.php

    Code:
    session_set_cookie_params(0, $path, (zen_not_null($cookieDomain) ? $domainPrefix . $cookieDomain : ''), $secureFlag, TRUE);
    Setting $secureFlag, FALSE resolved the headers reporting of HttpOnly ... The cart seems to function, are there any pitfalls to this? It's certainly a complicated area of functions and I want to make sure it won't mess anything up.

    ~Melanie
    PRO-Webs, Inc. :: Recent Zen Cart Projects :: Zen Cart SEO – 12 Steps to Success
    **I answer questions in the forum, private messages are NOT answered. You are welcome to contact us via our website for professional engagements.

  2. #2
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: PCI Compliance/code injection

    Either of these combinations will set the 'secure' flag, since they cause the storefront to operate entirely with https URLs:

    ENABLE_SSL = 'true'
    HTTP_SERVER begins with https
    HTTPS_SERVER begins with https

    or

    ENABLE_SSL = 'false'
    HTTP_SERVER begins with https
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Nov 2007
    Location
    Woodbine, Georgia, United States
    Posts
    4,014
    Plugin Contributions
    61

    Default Re: PCI Compliance/code injection

    The secure attribute is there, it's the httponly part they are referring to
    PRO-Webs, Inc. :: Recent Zen Cart Projects :: Zen Cart SEO – 12 Steps to Success
    **I answer questions in the forum, private messages are NOT answered. You are welcome to contact us via our website for professional engagements.

  4. #4
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Cookies

    The secure attribute is there, it's the httponly part they are referring to
    Good point.
    It's ironic that their wording and related RFC docs all talk about the 'secure' flag, when their complaint is really about the 'httponly' flag (er, well PHP calls it httponly; it's really about the list of allowed "ports").

    Setting httponly to true will indeed make the scans pass. But it will break all sessions on a site that isn't running entirely on https. And any javascript/ajax calls must also use https endpoints, so you'll need to review all plugins/addons/templates/scripts/etc to ensure they're working.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  5. #5
    Join Date
    Nov 2007
    Location
    Woodbine, Georgia, United States
    Posts
    4,014
    Plugin Contributions
    61

    Default Re: Cookies

    Alright =) I'll dive back in with them
    PRO-Webs, Inc. :: Recent Zen Cart Projects :: Zen Cart SEO – 12 Steps to Success
    **I answer questions in the forum, private messages are NOT answered. You are welcome to contact us via our website for professional engagements.

  6. #6
    Join Date
    Nov 2007
    Location
    Woodbine, Georgia, United States
    Posts
    4,014
    Plugin Contributions
    61

    Default Re: Cookies

    I was able to get is marked false positive by sending them this (https://www.zen-cart.com/content.php?317-cookies) and a phone call
    PRO-Webs, Inc. :: Recent Zen Cart Projects :: Zen Cart SEO – 12 Steps to Success
    **I answer questions in the forum, private messages are NOT answered. You are welcome to contact us via our website for professional engagements.

  7. #7
    Join Date
    Nov 2007
    Location
    Woodbine, Georgia, United States
    Posts
    4,014
    Plugin Contributions
    61

    Default Re: Cookies

    Just an update for this. According to cPanel, to fix this you set the following for the PHP version.

    Code:
    /etc/php.ini
    
    session.cookie_httponly = True
    session.cookie_secure=on
    
    service httpd restart
    PRO-Webs, Inc. :: Recent Zen Cart Projects :: Zen Cart SEO – 12 Steps to Success
    **I answer questions in the forum, private messages are NOT answered. You are welcome to contact us via our website for professional engagements.

 

 

Similar Threads

  1. v151 Cookies
    By Dave224 in forum General Questions
    Replies: 6
    Last Post: 25 May 2018, 07:26 PM
  2. Cookies
    By neit in forum General Questions
    Replies: 4
    Last Post: 22 May 2011, 10:12 PM
  3. cookies
    By jford in forum General Questions
    Replies: 7
    Last Post: 10 Jul 2006, 07:14 PM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR