Compare commits

...

2 Commits

Author SHA1 Message Date
JonnyWong16
cb577c51b8 v2.5.2-beta 2020-06-27 15:04:06 -07:00
JonnyWong16
1c395ab10c Patch SameSite support into cookies
* Python 2.7 is missing SameSite cookie attribute
2020-06-27 15:01:16 -07:00
3 changed files with 14 additions and 1 deletions

View File

@@ -1,5 +1,11 @@
# Changelog
## v2.5.2-beta (2020-06-27)
* Other:
* Fix: Login to Tautulli not working on Python 2.
## v2.5.1-beta (2020-06-26)
* Notifications:

View File

@@ -18,4 +18,4 @@
from __future__ import unicode_literals
PLEXPY_BRANCH = "beta"
PLEXPY_RELEASE_VERSION = "v2.5.1-beta"
PLEXPY_RELEASE_VERSION = "v2.5.2-beta"

View File

@@ -41,6 +41,13 @@ else:
from plexpy.users import Users, refresh_users
from plexpy.plextv import PlexTV
# Monkey patch SameSite support into cookies.
# https://stackoverflow.com/a/50813092
try:
from http.cookies import Morsel
except ImportError:
from Cookie import Morsel
Morsel._reserved[str('samesite')] = str('SameSite')
JWT_ALGORITHM = 'HS256'
JWT_COOKIE_NAME = 'tautulli_token_'