Skip to content

Commit a7f2738

Browse files
committed
chores: Update CHANGELOG and fix typo
1 parent a751f80 commit a7f2738

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99
## [unreleased]
1010

1111

12+
## Fixes
13+
14+
- Anti csrf check should happen only when access token is passed while session is optional
15+
1216
## [0.14.6] - 2023-06-22
1317

1418
### Changes and fixes

tests/test_session.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -719,7 +719,7 @@ async def test_that_verify_session_doesnt_always_call_core():
719719
assert session3.refresh_token is not None
720720

721721
assert (
722-
AllowedProcessStates.CALLING_SERVICE_IN_VERIFYG
722+
AllowedProcessStates.CALLING_SERVICE_IN_VERIFY
723723
not in ProcessState.get_instance().history
724724
)
725725

@@ -741,11 +741,13 @@ async def test_that_verify_session_doesnt_always_call_core():
741741
async def test_anti_csrf_header_via_custom_header_check_happens_only_when_access_token_is_provided(
742742
driver_config_client: TestClient,
743743
):
744-
args = get_st_init_args([session.init(anti_csrf="VIA_CUSTOM_HEADER", get_token_transfer_method=lambda *_: "cookie")]) # type: ignore
744+
args = get_st_init_args([session.init(anti_csrf="VIA_CUSTOM_HEADER", get_token_transfer_method=lambda *_: "cookie")]) # type: ignore
745745
init(**args) # type: ignore
746746
start_st()
747747

748-
response = driver_config_client.post("/create")
748+
response = driver_config_client.post(
749+
"/create"
750+
)
749751
assert response.status_code == 200
750752

751753
# With access token:
@@ -755,8 +757,7 @@ async def test_anti_csrf_header_via_custom_header_check_happens_only_when_access
755757
assert response.json() == {"message": "try refresh token"}
756758

757759
# with RID:
758-
response = driver_config_client.post(
759-
"/sessioninfo-optional",
760+
response = driver_config_client.post("/sessioninfo-optional",
760761
headers={
761762
"rid": "session",
762763
},

0 commit comments

Comments
 (0)