Skip to content

Conversation

@dt-thomas-durand
Copy link
Contributor

Description

In certain scenarios, TrustedDeviceTokenStorage might not be re-instanciated between requests. That's the case when multiple requests are handled by a single worker, like when serving the application with RoadRunner or with FrankenPHP. In that case, the trusted_device cookie leak from a request to another, and break the feature entirely. By implementing ResetInterface, the storage is now properly reseted between requests

@dt-thomas-durand dt-thomas-durand force-pushed the trusted-device-reset branch 2 times, most recently from 9c37f5f to c674b19 Compare March 21, 2025 14:42
In certain scenarios, TrustedDeviceTokenStorage might not be re-instanciated between requests.
That's the case when multiple requests are handled by a single worker, like when serving the application with RoadRunner or with FrankenPHP.
In that case, the trusted_device cookie leak from a request to another, and break the feature entirely.
By implementing ResetInterface, the storage is now properly reseted between requests
@dt-thomas-durand dt-thomas-durand changed the title feat: make TrustedDeviceTokenStorage conform to ResetInterface fix: make TrustedDeviceTokenStorage conform to ResetInterface Mar 21, 2025
@scheb
Copy link
Owner

scheb commented Mar 22, 2025

Yes, we could add this. Two things that we need to change:

  • Add a unit test to ensure the values are actually reset
  • Please declare symfony/contracts as a dependency on the package

@dt-thomas-durand
Copy link
Contributor Author

Yes, we could add this. Two things that we need to change:

  • Add a unit test to ensure the values are actually reset

  • Please declare symfony/contracts as a dependency on the package

Thanks for your feedback.
I'll add those asap!

Added it to the bundle for maintainability reasons.
I'll be easier to upgrade Symfony if all Symfony dependencies lies in the bundle
@scheb scheb merged commit b6139cc into scheb:7.x Mar 23, 2025
11 checks passed
@scheb
Copy link
Owner

scheb commented Mar 23, 2025

Perfect, thank you very much! Released as v7.7.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants