-
-
Notifications
You must be signed in to change notification settings - Fork 286
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Shared request headers between different requests #617
Comments
I tried to reproduce the issue but everything works as expected: https://github.com/dunglas/frankenphp-demo/compare/chore/reproducer-authorization?expand=1 Could you please edit this patch to provide a minimal reproducer? |
I'll try to reproduce it, thanks |
I had similar experience with a similar setup - strange behaviour with 401 responses just after sucessful login. This was not reliably reproducable and only occured after the instance has run for some time. Could it be some cache related issue in Symfony (symfony/symfony#52079 mentions some left over work for cache in long running processes)? |
I don't see how it can relate to cache issues but it's hard to tell without a reproducer. Do you use the PHP cache proxy provided by Symfony or something like that? |
The one provided by Symfony, yes. We use remote keys sets for JWT verification and we cache the sets locally ( |
Hi @dunglas i have the same problem maybe like on apache where we must add set-env Authorization *() HTTP_AUTORIZATION ?did it is not needed on caddy ? What do you think? |
@filoucrackeur it's unlikely. Would you be able to provide a reproducer (even if it happens randomly)? |
I'm observing something similar, leak between workers or something. If I try to xdebug it only 3rd request in getting connected to IDE. clip2-Screen.Recording.2024-04-18.at.20.38.30.movIt looks like some cache, because process is not connecting to IDE, and if could cache ignore QS? |
This looks like a known EasyAdmin bug. Are you using EA? It yes, this is an issue that is being tracked by EasyAdmin. There is nothing we can do on our side: EasyCorp/EasyAdminBundle#5986 We're working with @javiereguiluz to solve it. I plan to work on it soon but not ETA :( |
@dunglas yes, it's EA, from what I've observed Looks like a valid "solution": EasyCorp/EasyAdminBundle#5986 (comment) |
@oleg-andreyev please note that even if this issue happens in EasyAdmin ... it not only happens in EasyAdmin. Some people are reporting the same issue when using Shopware and FrankenPHP and for the exact same reason: Twig globals. Let's see if this can be solved at Twig level somehow. See twigphp/Twig#4007 |
@javiereguiluz Yes, already figured out that it's not EA itself . |
Closing here, this should be fixed in EasyAdmin/ShopWare or/and in Twig. |
What happened?
In Worker mode, I ran into the problem that the context is shared between different requests - it looks like the headers of the previous request remain in the context and are used in the next request. In particular, the Authorization header - a new request has arrived on the server, and the code continues to work with the Authorizztion's value of previous one.
As soon as I turn off the worker mode, everything starts working correctly.
I have a pretty standard installation: Symfony 6.4 + lexikjwt.
What can you suggest me? Thanks.
Build Type
Docker (Alpine)
Worker Mode
Yes
Operating System
GNU/Linux
CPU Architecture
x86_64
PHP configuration
The text was updated successfully, but these errors were encountered: