diff --git a/requirements.txt b/requirements.txt index a66fd304b1..b8134c16b1 100644 --- a/requirements.txt +++ b/requirements.txt @@ -14,6 +14,6 @@ djangorestframework==3.11.1 python-dateutil requests pillow -pyjwt +pyjwt==2.1.0 pycryptodome requests_oauthlib diff --git a/seahub/onlyoffice/utils.py b/seahub/onlyoffice/utils.py index 91be11b65e..552954862f 100644 --- a/seahub/onlyoffice/utils.py +++ b/seahub/onlyoffice/utils.py @@ -139,6 +139,6 @@ def get_onlyoffice_dict(request, username, repo_id, file_path, file_id='', } } - return_dict['onlyoffice_jwt_token'] = jwt.encode(config, ONLYOFFICE_JWT_SECRET).decode('utf-8') + return_dict['onlyoffice_jwt_token'] = jwt.encode(config, ONLYOFFICE_JWT_SECRET) return return_dict