Skip to content

Commit 1cf4259

Browse files
Apply suggestions from code review
Co-authored-by: Andrew Chen Wang <[email protected]>
1 parent 298e484 commit 1cf4259

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1717
## [2.0.0] unreleased
1818

1919
### Changed
20-
* #1093 Changed to implement [hashed](https://docs.djangoproject.com/en/stable/topics/auth/passwords/)
20+
* #1093 (**Breaking**) Changed to implement [hashed](https://docs.djangoproject.com/en/stable/topics/auth/passwords/)
2121
client_secret values. This is a **breaking change** that will migrate all your existing
2222
cleartext `application.client_secret` values to be hashed with Django's default password hashing algorithm
2323
and can not be reversed. When adding or modifying an Application in the Admin console, you must copy the

tests/test_introspection_view.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ def test_view_post_valid_client_creds_basic_auth(self):
304304

305305
def test_view_post_invalid_client_creds_basic_auth(self):
306306
"""Must fail for invalid client credentials"""
307-
auth_headers = get_basic_auth_header(self.application.client_id, CLEARTEXT_SECRET + "_so_wrong")
307+
auth_headers = get_basic_auth_header(self.application.client_id, f"{CLEARTEXT_SECRET}_so_wrong")
308308
response = self.client.post(
309309
reverse("oauth2_provider:introspect"), {"token": self.valid_token.token}, **auth_headers
310310
)
@@ -341,7 +341,7 @@ def test_view_post_invalid_client_creds_plaintext(self):
341341
{
342342
"token": self.valid_token.token,
343343
"client_id": self.application.client_id,
344-
"client_secret": CLEARTEXT_SECRET + "_so_wrong",
344+
"client_secret": f"{CLEARTEXT_SECRET}_so_wrong",
345345
},
346346
)
347347
self.assertEqual(response.status_code, 403)

0 commit comments

Comments
 (0)