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!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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:
    1
    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:
    241
    Likes Received:
    0
    Trophy Points:
    66
    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:
    1
    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:
    1
    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 Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,425
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    I'm happy to see you were able to address the issue. Thank you for updating us with the outcome.
     
Loading...

Share This Page