Commit 97489999 by PaulWattenberger Committed by GitHub

Merge pull request #13114 from edx/pwattenberger/ECOM-5059

ECOM-5059 Fix domain Sailthru logon cookie dropped in to
parents 113458a3 366b5226
...@@ -7,6 +7,7 @@ import crum ...@@ -7,6 +7,7 @@ import crum
from django.dispatch import receiver from django.dispatch import receiver
from django.core.urlresolvers import reverse from django.core.urlresolvers import reverse
from django.conf import settings
from student.models import ENROLL_STATUS_CHANGE from student.models import ENROLL_STATUS_CHANGE
from student.cookies import CREATE_LOGON_COOKIE from student.cookies import CREATE_LOGON_COOKIE
...@@ -116,7 +117,9 @@ def add_email_marketing_cookies(sender, response=None, user=None, ...@@ -116,7 +117,9 @@ def add_email_marketing_cookies(sender, response=None, user=None,
response.set_cookie( response.set_cookie(
'sailthru_hid', 'sailthru_hid',
cookie, cookie,
max_age=365 * 24 * 60 * 60 # set for 1 year max_age=365 * 24 * 60 * 60, # set for 1 year
domain=settings.SESSION_COOKIE_DOMAIN,
path='/',
) )
else: else:
log.error("No cookie returned attempting to obtain cookie from Sailthru for %s", user.email) log.error("No cookie returned attempting to obtain cookie from Sailthru for %s", user.email)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment