forked from pool/python-djangorestframework-simplejwt
Compare commits
19 Commits
| Author | SHA256 | Date | |
|---|---|---|---|
| c1cbb76649 | |||
| 9e28694865 | |||
| 16b8f420ce | |||
| ab7e7d9f04 | |||
| 477ee5bb1f | |||
| bf9ae18e8f | |||
| 812c8ed4fd | |||
| b819937497 | |||
| fcee264765 | |||
| 05eccdee9b | |||
| 50699470c4 | |||
|
|
27ac0547c0 | ||
| a9c8c3e042 | |||
| 0fa8fbc3f2 | |||
|
|
ac96ce839a | ||
|
|
79828fa2ed | ||
|
|
2406b9f263 | ||
| b6f941d00c | |||
|
|
fc53b712dc |
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:6c4bd37537440bc439564ebf7d6085e74c5411485197073f508ebdfa34bc9fae
|
||||
size 94266
|
||||
3
djangorestframework_simplejwt-5.5.1.tar.gz
Normal file
3
djangorestframework_simplejwt-5.5.1.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:e72c5572f51d7803021288e2057afcbd03f17fe11d484096f40a460abc76e87f
|
||||
size 101265
|
||||
@@ -1,72 +0,0 @@
|
||||
From 0b50ee6721155ce0f652d4c1f47dcbb10c191894 Mon Sep 17 00:00:00 2001
|
||||
From: Mike <mike@zivix.com>
|
||||
Date: Mon, 4 Dec 2023 17:48:36 -0800
|
||||
Subject: [PATCH] Fix tests (#769)
|
||||
|
||||
---
|
||||
rest_framework_simplejwt/utils.py | 5 ++---
|
||||
tests/test_init.py | 5 ++---
|
||||
tests/test_utils.py | 11 ++++-------
|
||||
3 files changed, 8 insertions(+), 13 deletions(-)
|
||||
|
||||
Index: djangorestframework_simplejwt-5.3.1/rest_framework_simplejwt/utils.py
|
||||
===================================================================
|
||||
--- djangorestframework_simplejwt-5.3.1.orig/rest_framework_simplejwt/utils.py
|
||||
+++ djangorestframework_simplejwt-5.3.1/rest_framework_simplejwt/utils.py
|
||||
@@ -5,7 +5,6 @@ from typing import Callable
|
||||
|
||||
from django.conf import settings
|
||||
from django.utils.functional import lazy
|
||||
-from django.utils.timezone import is_naive, make_aware
|
||||
|
||||
|
||||
def get_md5_hash_password(password: str) -> str:
|
||||
@@ -16,8 +15,8 @@ def get_md5_hash_password(password: str)
|
||||
|
||||
|
||||
def make_utc(dt: datetime) -> datetime:
|
||||
- if settings.USE_TZ and is_naive(dt):
|
||||
- return make_aware(dt, timezone=timezone.utc)
|
||||
+ if settings.USE_TZ and dt.tzinfo is None:
|
||||
+ return dt.replace(tzinfo=timezone.utc)
|
||||
|
||||
return dt
|
||||
|
||||
Index: djangorestframework_simplejwt-5.3.1/tests/test_utils.py
|
||||
===================================================================
|
||||
--- djangorestframework_simplejwt-5.3.1.orig/tests/test_utils.py
|
||||
+++ djangorestframework_simplejwt-5.3.1/tests/test_utils.py
|
||||
@@ -1,7 +1,6 @@
|
||||
-from datetime import datetime, timedelta
|
||||
+from datetime import datetime, timedelta, timezone
|
||||
|
||||
from django.test import TestCase
|
||||
-from django.utils import timezone
|
||||
from freezegun import freeze_time
|
||||
|
||||
from rest_framework_simplejwt.utils import (
|
||||
@@ -24,11 +23,11 @@ class TestMakeUtc(TestCase):
|
||||
|
||||
with self.settings(USE_TZ=False):
|
||||
dt = make_utc(dt)
|
||||
- self.assertTrue(timezone.is_naive(dt))
|
||||
+ self.assertTrue(dt.tzinfo is None)
|
||||
|
||||
with self.settings(USE_TZ=True):
|
||||
dt = make_utc(dt)
|
||||
- self.assertTrue(timezone.is_aware(dt))
|
||||
+ self.assertTrue(dt.tzinfo is not None)
|
||||
self.assertEqual(dt.utcoffset(), timedelta(seconds=0))
|
||||
|
||||
|
||||
@@ -39,9 +38,7 @@ class TestAwareUtcnow(TestCase):
|
||||
with freeze_time(now):
|
||||
# Should return aware utcnow if USE_TZ == True
|
||||
with self.settings(USE_TZ=True):
|
||||
- self.assertEqual(
|
||||
- timezone.make_aware(now, timezone=timezone.utc), aware_utcnow()
|
||||
- )
|
||||
+ self.assertEqual(now.replace(tzinfo=timezone.utc), aware_utcnow())
|
||||
|
||||
# Should return naive utcnow if USE_TZ == False
|
||||
with self.settings(USE_TZ=False):
|
||||
@@ -1,3 +1,29 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Nov 3 09:29:49 UTC 2025 - Markéta Machová <mmachova@suse.com>
|
||||
|
||||
- Update to 5.5.1 (CVE-2024-22513, bsc#1221568)
|
||||
* Changed string formatting in views
|
||||
* Enhance BlacklistMixin with Generic Type for Accurate Type Inference
|
||||
* Improve type of Token.for_user to allow subclasses
|
||||
* Fix the Null value of the OutstandingToken of the BlacklistMixin.blacklist
|
||||
* Add option to allow inactive user authentication and token generation
|
||||
* Add support for EdDSA and other algorithms in jwt.algorithms.requires_cryptography
|
||||
* Drop Django <4.2, DRF <3.14, Python <3.9. Note, many deprecated versions are only
|
||||
officially not supported but probably still work fine.
|
||||
* Add specific "token expired" exceptions
|
||||
* Fix user_id type mismatch when user claim is not pk
|
||||
* Caching signing key
|
||||
* fix: add missing migration for token_blacklist app
|
||||
* docs: Add warning in docs for for_user usage
|
||||
* feat: log warning if token is being created for inactive user
|
||||
* fix: always stringify user_id claim
|
||||
- Drop fix-tests.patch, merged upstream
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Nov 11 16:58:30 UTC 2024 - Markéta Machová <mmachova@suse.com>
|
||||
|
||||
- Add missing dependency
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jul 19 11:26:13 UTC 2024 - Markéta Machová <mmachova@suse.com>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-djangorestframework-simplejwt
|
||||
#
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
# Copyright (c) 2025 SUSE LLC and contributors
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -18,16 +18,15 @@
|
||||
|
||||
%{?sle15_python_module_pythons}
|
||||
Name: python-djangorestframework-simplejwt
|
||||
Version: 5.3.1
|
||||
Version: 5.5.1
|
||||
Release: 0
|
||||
Summary: JSON Web Token authentication for Django REST Framework
|
||||
License: MIT
|
||||
URL: https://github.com/davesque/django-rest-framework-simplejwt
|
||||
Source: https://files.pythonhosted.org/packages/source/d/djangorestframework-simplejwt/djangorestframework_simplejwt-%{version}.tar.gz
|
||||
# PATCH-FIX-UPSTREAM https://github.com/jazzband/djangorestframework-simplejwt/pull/769 Fix tests
|
||||
Patch0: fix-tests.patch
|
||||
BuildRequires: %{python_module Django}
|
||||
BuildRequires: %{python_module PyJWT}
|
||||
BuildRequires: %{python_module cryptography}
|
||||
BuildRequires: %{python_module djangorestframework}
|
||||
BuildRequires: %{python_module freezegun}
|
||||
BuildRequires: %{python_module pip}
|
||||
@@ -39,6 +38,7 @@ BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
Requires: python-PyJWT
|
||||
Requires: python-djangorestframework
|
||||
Recommends: python-cryptography
|
||||
Recommends: python-python-jose
|
||||
BuildArch: noarch
|
||||
%python_subpackages
|
||||
|
||||
Reference in New Issue
Block a user