Session Cookie (pmf_sid) PCI compliance

All about webserver configurations, PHP and databases.

Moderator: Thorsten

Post Reply
GBC
Posts: 3
Joined: Thu May 25, 2017 3:49 pm

Session Cookie (pmf_sid) PCI compliance

Post by GBC » Fri Jun 09, 2017 1:40 pm

Hi,

Before I start fiddling with phpMyFAQ script I thought I ask if there has already been a developed measure in place to set 'httpOnly' agaist pmf_sid cookie, at all?
Idally, it would be interesting to see if one can set 'httpOnly' and 'Secure' all toghether.

Please note, our php.ini has already working flags (which show up on other cookies), yet these are not being picked up by pmf_sid.

I'd appreciate your thoughts on this.

Thank you

Thorsten
Posts: 14482
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Session Cookie (pmf_sid) PCI compliance

Post by Thorsten » Thu Jun 15, 2017 9:30 am

Hi,

I tried httpOnly cookies some years ago and they worked on most user scenarios.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist

JochenS
Posts: 120
Joined: Wed Feb 16, 2011 3:51 pm
Location: Schönaich
Contact:

Re: Session Cookie (pmf_sid) PCI compliance

Post by JochenS » Tue Aug 08, 2017 3:50 pm

Our security dep pushed me on this issue:

The cookie is not controlled via php.ini, but depending on phpMyFAQ.

I have modified the setCookie function in the file inc\PMF\session.php:

Code: Select all

    public static function setCookie($name, $sessionId = '', $timeout = PMF_SESSION_EXPIRED_TIME)
    {
        return setcookie(
            $name,
			$sessionId,
                        $_SERVER['REQUEST_TIME'] + $timeout,
		        dirname($_SERVER['SCRIPT_NAME']),
			"myFAQURL",
			true,
			true			
        );
    }
My questions are

1. How to make this working for systems with ttp as well (the last 3 items shall not be used).
2. How to use the function getDefaultUrl?

Thorsten
Posts: 14482
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Session Cookie (pmf_sid) PCI compliance

Post by Thorsten » Tue Aug 08, 2017 4:34 pm

Hi Jochen,

1) can by configured by phpMyFAQ itself as it detects HTTP or HTTPS
2) I can add this in 2.10 if you like

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist

JochenS
Posts: 120
Joined: Wed Feb 16, 2011 3:51 pm
Location: Schönaich
Contact:

Re: Session Cookie (pmf_sid) PCI compliance

Post by JochenS » Wed Aug 09, 2017 7:10 am

Thanks this would be great. I have added an item in github:
https://github.com/thorsten/phpMyFAQ/issues/1349

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests