Page 1 of 1

Session Cookie (pmf_sid) PCI compliance

Posted: Fri Jun 09, 2017 1:40 pm
by GBC
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

Re: Session Cookie (pmf_sid) PCI compliance

Posted: Thu Jun 15, 2017 9:30 am
by Thorsten
Hi,

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

bye
Thorsten

Re: Session Cookie (pmf_sid) PCI compliance

Posted: Tue Aug 08, 2017 3:50 pm
by JochenS
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?

Re: Session Cookie (pmf_sid) PCI compliance

Posted: Tue Aug 08, 2017 4:34 pm
by Thorsten
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

Re: Session Cookie (pmf_sid) PCI compliance

Posted: Wed Aug 09, 2017 7:10 am
by JochenS
Thanks this would be great. I have added an item in github:
https://github.com/thorsten/phpMyFAQ/issues/1349