Open supercairos opened 1 week ago
No response
When listing all consent session, Hydra filters out the expired consent sessions. https://github.com/ory/hydra/blob/eeaf6f01bcddc85569604702c0e9c2f3857d1902/persistence/sql/persister_consent.go#L548
But when counting the availlable consent sessions, Hydra doesn't filter out the expired consent sessions. https://github.com/ory/hydra/blob/eeaf6f01bcddc85569604702c0e9c2f3857d1902/persistence/sql/persister_consent.go#L601
Leading to an inconsistency between the pagination and the returned consent session.
Have some expired session in your DB.
List all sessions. notice the pagination header is wrong.
Ory/Hydra 2.2.0
2.2.0
Linux
Kubernetes with Helm
Preflight checklist
Ory Network Project
No response
Describe the bug
When listing all consent session, Hydra filters out the expired consent sessions. https://github.com/ory/hydra/blob/eeaf6f01bcddc85569604702c0e9c2f3857d1902/persistence/sql/persister_consent.go#L548
But when counting the availlable consent sessions, Hydra doesn't filter out the expired consent sessions. https://github.com/ory/hydra/blob/eeaf6f01bcddc85569604702c0e9c2f3857d1902/persistence/sql/persister_consent.go#L601
Leading to an inconsistency between the pagination and the returned consent session.
Reproducing the bug
Have some expired session in your DB.
List all sessions. notice the pagination header is wrong.
Relevant log output
No response
Relevant configuration
Version
2.2.0
On which operating system are you observing this issue?
Linux
In which environment are you deploying?
Kubernetes with Helm
Additional Context
No response