Jump to content


Wszystko co chcesz wiedzieć o konfiguracji sklepów prestashop, możliwościach konfiguracyjnych i innych ustawieniach środowiska sklepu internetowego
Photo
- - - - -

Secure Cookies


  • Please log in to reply
4 replies to this topic

#1 tobi_2309

tobi_2309

    Newbie

  • Members
  • Pip
  • 3 posts
  • LocationRugby, UK

Posted 11 August 2021 - 09:56 AM

Witam.

 

Posiadam dosc swiezy sklep na bazie prestashop, wiec niestety moja wiedza jest znikoma.

Mam obecnie problem z bezpieczenstwem cookies i nie potrafie tego naprawic.

Bardzo bym prosil o jakakolwiek pomoc. Szczegoly podaje ponizej. Dzieki.

 

Your website also uses insecure cookies that can be read via JavaScript. This allows an attacker, for example, to access customer data more easily in the current user session.

 

To do this, use the HttpOnly flag in the Set Cookie Response header:
Set-Cookie: MeinCookie=myvalue; path=/; HttpOnly     



#2 hrbj

hrbj

    Administrator

  • Administrators
  • 13 posts

Posted 11 August 2021 - 10:24 AM

a to ciasteczko do którego odnosi się raport, jest ciasteczkiem z prestashop (domyślnym, tworzonym przez prestę) czy jest to efekt działania jakiejś wtyczki?

dodatkowo - czy strona jest zabezpieczona certyfikatem ssl ?



#3 tobi_2309

tobi_2309

    Newbie

  • Members
  • Pip
  • 3 posts
  • LocationRugby, UK

Posted 11 August 2021 - 10:28 AM

standardowe cookies, bez modulu czy jakiejkolwiek ingerencji. ssl jest normalnie. 



#4 vekia

vekia

    Advanced Member

  • Members
  • PipPipPip
  • 221 posts

Posted 11 August 2021 - 11:52 AM

Weryfikacyjnie możemy wymusić tworzenie cookie w trybie secure

w pliku: /classes/Cookie.php mamy funkcję 

    public function __construct($name, $path = '', $expire = null, $shared_urls = null, $standalone = false, $secure = false)
    {
        $this->_content = array();
        $this->_standalone = $standalone;
        $this->_expire = is_null($expire) ? time() + 1728000 : (int)$expire;
        $this->_path = trim(($this->_standalone ? '' : Context::getContext()->shop->physical_uri).$path, '/\\').'/';
        if ($this->_path{0} != '/') {
            $this->_path = '/'.$this->_path;
        }
        $this->_path = rawurlencode($this->_path);
        $this->_path = str_replace('%2F', '/', $this->_path);
        $this->_path = str_replace('%7E', '~', $this->_path);
        $this->_domain = $this->getDomain($shared_urls);
        $this->_name = 'PrestaShop-'.md5(($this->_standalone ? '' : _PS_VERSION_).$name.$this->_domain);
        $this->_allow_writing = true;
        $this->_salt = $this->_standalone ? str_pad('', 8, md5('ps'.__FILE__)) : _COOKIE_IV_;
        $this->_cipherTool = new Rijndael(_RIJNDAEL_KEY_, _RIJNDAEL_IV_);
        $this->_secure = (bool)$secure;

        $this->update();
    }

zmieniamy wartość parametru 

$this->_secure = (bool)$secure;

na 

$this->_secure = true;

czy to cokolwiek zmienia w raporcie?



#5 tobi_2309

tobi_2309

    Newbie

  • Members
  • Pip
  • 3 posts
  • LocationRugby, UK

Posted 11 August 2021 - 01:39 PM

po zmianie strona przestala dzialac. musialem wrzucic poprzednie ustawienia.  https://1drv.ms/u/s!...w_n2dA?e=uN43YL






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users