-
-
Notifications
You must be signed in to change notification settings - Fork 144
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
Session Headers Repeated #509
Comments
Does this also happen on the suite 8 online demo ? User will pass will |
Online demo appears to be working as expected. Not seeing the problem there. |
It looks like a similar Repeated Headers issue was fixed in 2022 in Nginx Gateway Fabric. |
No, this is not caused by Nginx Gateway Fabric. What i'm seeing is that the application keeps switching between the legacy sugar session, and the symfony session. Each time it switches between them, it writes that session cookie back to the browser. Switching the code there to only start the symfony session, and not restart it results with the session cookie being sent more like anticipated (only if it changes and not multiple times). protected function startSymfonySession(): void
{
if ($this->session->isStarted()) {
return;
}
$this->session->setName($this->defaultSessionName);
if (isset($_COOKIE[$this->defaultSessionName])) {
$this->session->setId($_COOKIE[$this->defaultSessionName]);
}
$this->session->start();
}
protected function startLegacySession(): void
{
$this->startSymfonySession();
return;
} But does result in some odd behaviour when visiting certain portions of the website then though. |
Nice! It looks like you found the cause of this issue. |
To get stuff working as expected across the board with the code change above, I also had to swap out any places in code that had So all this to say, I do feel like something weird is going on with suite crm's session juggling there that results in this problem, but don't feel like my code changes are necessarily the appropriate way to fix the underlying problem. I am curious as to how the demo server is configured as it doesn't seem to present this problem? |
Issue
The
![image](https://private-user-images.githubusercontent.com/52090243/348390299-cbee58d3-3b10-4fce-9be7-87d4c90427d0.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1Nzg3MDQsIm5iZiI6MTczOTU3ODQwNCwicGF0aCI6Ii81MjA5MDI0My8zNDgzOTAyOTktY2JlZTU4ZDMtM2IxMC00ZmNlLTliZTctODdkNGM5MDQyN2QwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE1VDAwMTMyNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWVhMDMwMjY3YTFjZjAzYzcxYzc5MTA0OGU5MjJhY2RlZjE0MDYzZjhmNjAzNGFmMTlmNTgyZTM0N2NmODJmMzEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.EzZXssz8JMSqQg67aEBdXk4xR5o9ak6J3lxxfGRxzS0)
PHPSESSID
andLEGACYSESSID
cookies are repeated a crazy number of times in the response headersThis causes problems when hosting SuiteCrm behind a proxy such as nginx that has default max sizes allowed for the response headers.
Possible Fix
Make sure
PHPSESSID
andLEGACYSESSID
are only returned once in the headers like would be expectedSteps to Reproduce the Issue
Context
We run suitecrm on kubernetes which proxies via NGINX Gateway Fabric
Currently you can't configure it to allow larger response headers, so it errors.
So basically can't run suite crm
8.6.1
on there until this is resolved. Was working in8.5.1
(still might have been returning multiple times, but was few enough that the proxy didn't complain)Version
8.6.1
What browser are you currently using?
Chrome
Browser Version
No response
Environment Information
PHP 8.2
Operating System and Version
Debian 12
The text was updated successfully, but these errors were encountered: