Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

SOLVED Cookie Does Not Contain The Secure Attribute

Discussion in 'General Discussion' started by cEMa, Jun 15, 2017.

  1. cEMa

    cEMa Registered

    Joined:
    Mar 15, 2016
    Messages:
    3
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    TN
    cPanel Access Level:
    DataCenter Provider
    Hey everyone,
    In order to pass PCI Compliance, I need to enable Header always edit Set-Cookie (.*) "$1; HTTPOnly; Secure" on the WHM/cPanel ports 2082,2086,2087,2095.

    Placing this rule in the httpd conf broke a number of websites, so I've been individually adding it to each site using their .htaccess file. However, the PCI compliance scan detected the above ports as well.
    • Is this a false positive?
    • If not, how can I apply this rule to only WHM/cPanel ports mentioned above?

    Any insight would be greatly appreciated.

    Sincerely,
    Chase M.
     
  2. tank

    tank Well-Known Member

    Joined:
    Apr 12, 2011
    Messages:
    254
    Likes Received:
    1
    Trophy Points:
    68
    Location:
    Chicago, IL
    cPanel Access Level:
    Root Administrator
    I would not ever store credit cards on your server if you can help it. Most credit card processors have way for tokens to be used and other methods. Just my two cents. Take a look at the fees for credit cards that are stolen from your server. It is very steep.

    I hope some else can help you find and solve your problem. Just my two cents.
     
  3. cEMa

    cEMa Registered

    Joined:
    Mar 15, 2016
    Messages:
    3
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    TN
    cPanel Access Level:
    DataCenter Provider
    Thanks for the reply, tank.

    I would like to enforce this in the httpd conf, since every domain uses the free ssl certificate we provide; however, it breaks the checkout process of another domain (not sure why), causing me to resort to placing the rule in the domains .htaccess file.

    Anyone else got ideas?
     
  4. cEMa

    cEMa Registered

    Joined:
    Mar 15, 2016
    Messages:
    3
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    TN
    cPanel Access Level:
    DataCenter Provider
    I was able to resolve this by changing the Home > Service Configuration > Apache Configuration > Include Editor > Pre Main Include > All Versions

    From:

    Code:
    Header always edit Set-Cookie (.*) "$1; HTTPOnly; Secure"
    To:

    Code:
    Header edit Set-Cookie ^(.*)$ $1; HttpOnly; Secure
     
    Infopro likes this.
  5. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,802
    Likes Received:
    1,896
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    I'm happy to see you were able to address the issue. Thank you for updating us with the outcome.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. Heena H Thakkar

    Heena H Thakkar Registered

    Joined:
    Apr 3, 2018
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Hey I am still not able to fix above issue. Can you please help me?

    Vulnerability Detection Result
    The cookies:
    Code:
    Set-Cookie: Horde=***replaced***; HttpOnly; domain=.www.abc.com; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/; port=2096
    Set-Cookie: horde_secret_key=***replaced***; HttpOnly; domain=.www.abc.com; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/; port=2096
    
    are missing the "secure" attribute.
     
    #6 Heena H Thakkar, Apr 3, 2018
    Last edited by a moderator: Apr 3, 2018
  7. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,802
    Likes Received:
    1,896
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello @Heena H Thakkar,

    As I understand, the "unsecure cookie" message for Horde over port 2096 is a false positive as long as the "Require SSL for cPanel Services" option is enabled under the "Security" tab in "WHM >> Tweak Settings".

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  8. Heena H Thakkar

    Heena H Thakkar Registered

    Joined:
    Apr 3, 2018
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Hi , This is also not helping . Scan results shows same for 3 ports.
     
  9. Heena H Thakkar

    Heena H Thakkar Registered

    Joined:
    Apr 3, 2018
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Vulnerability Detection Result
    The cookies:

    Set-Cookie: Horde=***replaced***; HttpOnly; domain=.abc.com; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/; port=2096
    Set-Cookie: horde_secret_key=***replaced***; HttpOnly; domain=.abc.com; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/; port=2096

    are missing the "secure" attribute.


    This above is for two ports 2096/2083.

    I tried everything given above , still vulnerability scan gives such results.
     
  10. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,802
    Likes Received:
    1,896
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    Have you reported this as a false positive to the vendor? I understand this to be a false positive as long as the "Require SSL for cPanel Services" option is enabled under the "Security" tab in "WHM >> Tweak Settings".

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice