Page 1 of 1

(solved) Cookie issue with the chat (messenger) portion

Posted: August 23rd, 2023, 12:17 am
by Mandi
There is, at least on Firefox, a warning regarding the cookie on the chat - messenger about same site=lax. Will be looking further into this.

Re: Cookie issue with the chat (messenger) portion

Posted: August 25th, 2023, 8:11 pm
by Mandi
Cookie issue is now resolved. Also added in the secure attribute for extra protection. For this fix go to ext/pgreca/pgsocial/styles/all/template/js and open the file pg_social_chat.js

Locate line 6 which looks like this:

Code: Select all

Cookies.set('pgsocial_chat', '');
Replace with this:

Code: Select all

Cookies.set('pgsocial_chat', '', { sameSite: 'lax',secure: true });
Locate line 31 which looks like this:

Code: Select all

Cookies.set('pgsocial_chat', Cookies.get('pgsocial_chat')+',0');
Replace with this:

Code: Select all

Cookies.set('pgsocial_chat', Cookies.get('pgsocial_chat')+',0', { sameSite: 'lax',secure: true });
Locate line 74 which looks like this:

Code: Select all

Cookies.set('pgsocial_chat', newcokie);
Replace with this:

Code: Select all

Cookies.set('pgsocial_chat', newcokie, { sameSite: 'lax',secure: true });
Locate line 171 which looks like this:

Code: Select all

if(cookie) Cookies.set('pgsocial_chat', Cookies.get('pgsocial_chat')+","+person);
Replace with this:

Code: Select all

if(cookie) Cookies.set('pgsocial_chat', Cookies.get('pgsocial_chat')+","+person, { sameSite: 'lax',secure: true });
Locate line 248 which looks like this:

Code: Select all

Cookies.set('pgsocial_chat', newcokie);
Replace with this:

Code: Select all

Cookies.set('pgsocial_chat', newcokie, { sameSite: 'lax',secure: true });