Skip to content

Commit

Permalink
Merge pull request #832 from edx/mroytman/pin-pyjwt-library
Browse files Browse the repository at this point in the history
fix: Add Explicit Dependency on pyjwt Library with Constraint
  • Loading branch information
MichaelRoytman authored Apr 16, 2021
2 parents 79b12f5 + 3e78f3c commit 862e158
Show file tree
Hide file tree
Showing 10 changed files with 35 additions and 32 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ Change Log
Unreleased
~~~~~~~~~~

[3.8.7] - 2021-04-16
~~~~~~~~~~~~~~~~~~~~
* Add pyjwt as explicit dependency to edx-proctoring library.
* Pin version of pyjwt to less than 2.0.0.

[3.8.6] - 2021-04-13
~~~~~~~~~~~~~~~~~~~~
* Fix JWT encoding bug introduced by version 2.0.1 of pyjwt[crypto] library.
Expand Down
2 changes: 1 addition & 1 deletion edx_proctoring/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
"""

# Be sure to update the version number in edx_proctoring/package.json
__version__ = '3.8.6'
__version__ = '3.8.7'

default_app_config = 'edx_proctoring.apps.EdxProctoringConfig' # pylint: disable=invalid-name
2 changes: 1 addition & 1 deletion edx_proctoring/backends/rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ def get_instructor_url(self, course_id, user, exam_id=None, attempt_id=None, sho
token['config'] = True
if attempt_id:
token['attempt_id'] = attempt_id
encoded = jwt.encode(token, self.client_secret)
encoded = jwt.encode(token, self.client_secret).decode('utf-8')
url = self.instructor_url.format(client_id=self.client_id, jwt=encoded)

log.debug(
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@edx/edx-proctoring",
"//": "Be sure to update the version number in edx_proctoring/__init__.py",
"//": "Note that the version format is slightly different than that of the Python version when using prereleases.",
"version": "3.8.6",
"version": "3.8.7",
"main": "edx_proctoring/static/index.js",
"scripts":{
"test":"gulp test"
Expand Down
1 change: 1 addition & 0 deletions requirements/base.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ django-model-utils
djangorestframework
django-ipware>=1.1.0
jsonfield2
pyjwt<2.0.0 # Used for encoding JWTs when communicating with proctoring provider backends
pytz>=2018
pycryptodomex>=3.4.7
django-crum
Expand Down
3 changes: 2 additions & 1 deletion requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,9 @@ pycryptodomex==3.10.1
# pyjwkest
pyjwkest==1.4.2
# via edx-drf-extensions
pyjwt[crypto]==2.0.1
pyjwt[crypto]==1.7.1
# via
# -r requirements/base.in
# drf-jwt
# edx-rest-api-client
pymongo==3.11.3
Expand Down
29 changes: 11 additions & 18 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,14 @@
#
appdirs==1.4.4
# via virtualenv
astroid==2.5.2
astroid==2.5.3
# via
# pylint
# pylint-celery
bleach==3.3.0
# via readme-renderer
certifi==2020.12.5
# via requests
cffi==1.14.5
# via cryptography
chardet==4.0.0
# via
# diff-cover
Expand All @@ -32,8 +30,6 @@ code-annotations==1.1.1
# via edx-lint
colorama==0.4.4
# via twine
cryptography==3.4.7
# via secretstorage
diff-cover==5.0.1
# via -r requirements/dev.in
distlib==0.3.1
Expand All @@ -46,8 +42,11 @@ django==2.2.20
# code-annotations
# edx-i18n-tools
# edx-lint
docutils==0.17
# via readme-renderer
docutils==0.16
# via
# -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt
# readme-renderer
# rstcheck
edx-i18n-tools==0.5.3
# via -r requirements/dev.in
edx-lint==5.0.0
Expand All @@ -60,7 +59,7 @@ filelock==3.0.12
# virtualenv
idna==2.10
# via requests
importlib-metadata==3.10.0
importlib-metadata==3.10.1
# via
# keyring
# twine
Expand All @@ -70,10 +69,6 @@ isort==5.8.0
# via
# -r requirements/quality.in
# pylint
jeepney==0.6.0
# via
# keyring
# secretstorage
jinja2-pluralize==0.3.0
# via diff-cover
jinja2==2.11.3
Expand Down Expand Up @@ -103,7 +98,7 @@ pbr==5.5.1
# via stevedore
pep517==0.10.0
# via pip-tools
pip-tools==6.0.1
pip-tools==6.1.0
# via -r requirements/dev.in
pkginfo==1.7.0
# via twine
Expand All @@ -117,8 +112,6 @@ py==1.10.0
# via tox
pycodestyle==2.7.0
# via -r requirements/quality.in
pycparser==2.20
# via cffi
pydocstyle==6.0.0
# via -r requirements/quality.in
pygments==2.8.1
Expand All @@ -127,7 +120,7 @@ pygments==2.8.1
# readme-renderer
pylint-celery==0.3
# via edx-lint
pylint-django==2.4.2
pylint-django==2.4.3
# via edx-lint
pylint-plugin-utils==0.6
# via
Expand Down Expand Up @@ -159,8 +152,8 @@ requests==2.25.1
# twine
rfc3986==1.4.0
# via twine
secretstorage==3.3.1
# via keyring
rstcheck==3.3.1
# via -r requirements/quality.in
six==1.15.0
# via
# bleach
Expand Down
8 changes: 5 additions & 3 deletions requirements/doc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,9 @@ djangorestframework==3.12.4
# rest-condition
doc8==0.8.1
# via -r requirements/doc.in
docutils==0.17
docutils==0.16
# via
# -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt
# doc8
# readme-renderer
# restructuredtext-lint
Expand Down Expand Up @@ -160,8 +161,9 @@ pygments==2.8.1
# sphinx
pyjwkest==1.4.2
# via edx-drf-extensions
pyjwt[crypto]==2.0.1
pyjwt[crypto]==1.7.1
# via
# -r requirements/base.in
# drf-jwt
# edx-rest-api-client
pymongo==3.11.3
Expand Down Expand Up @@ -222,7 +224,7 @@ slumber==0.7.1
# via edx-rest-api-client
snowballstemmer==2.1.0
# via sphinx
sphinx==3.5.3
sphinx==3.5.4
# via
# -r requirements/doc.in
# edx-sphinx-theme
Expand Down
10 changes: 5 additions & 5 deletions requirements/quality.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
# This file is autogenerated by pip-compile
# To update, run:
#
# pip-compile --output-file=requirements/quality.txt requirements/quality.in
# make upgrade
#
astroid==2.5.2
astroid==2.5.3
# via
# pylint
# pylint-celery
Expand All @@ -31,7 +31,7 @@ django==2.2.20
# -r requirements/quality.in
# code-annotations
# edx-lint
docutils==0.17
docutils==0.16
# via
# -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt
# readme-renderer
Expand All @@ -40,7 +40,7 @@ edx-lint==5.0.0
# via -r requirements/quality.in
idna==2.10
# via requests
importlib-metadata==3.10.0
importlib-metadata==3.10.1
# via
# keyring
# twine
Expand Down Expand Up @@ -72,7 +72,7 @@ pygments==2.8.1
# via readme-renderer
pylint-celery==0.3
# via edx-lint
pylint-django==2.4.2
pylint-django==2.4.3
# via edx-lint
pylint-plugin-utils==0.6
# via
Expand Down
5 changes: 3 additions & 2 deletions requirements/test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,9 @@ pycryptodomex==3.10.1
# pyjwkest
pyjwkest==1.4.2
# via edx-drf-extensions
pyjwt[crypto]==2.0.1
pyjwt[crypto]==1.7.1
# via
# -r requirements/base.in
# drf-jwt
# edx-rest-api-client
pymongo==3.11.3
Expand All @@ -180,7 +181,7 @@ pyparsing==2.4.7
# via packaging
pytest-cov==2.11.1
# via -r requirements/test.in
pytest-django==4.1.0
pytest-django==4.2.0
# via -r requirements/test.in
pytest-forked==1.3.0
# via pytest-xdist
Expand Down

0 comments on commit 862e158

Please sign in to comment.