Pdata not cleared after session upgrade
Concerned version
Version: %2.0
Platform: Debian + Nginx
Summary
- Configure a Choice authentification
- In my tests: Demo + HTTP auth (level 4)
- Configure test1.example.com to require auth level 3
- Login with Demo
- Browse to test1.example.com
- You will see a message about having to upgrade
- Login again, using a stronger authentication scheme
- You are redirected to test1.example.com successfully
- Browse back to the portal
- pdata redirects you immediately to test1.example.com
Logs
Normal login
[debug] Return SSO session 9ae234b40d00cdbd6a0ba4f64cf1f6b3bfb8999e65d82a06f326ea8395f05399
[debug] Processing code ref
[debug] Launching ::Auth::Choice::_afterData
[debug] Unable to find enabledMods0 in this context: afterData
[debug] Processing code ref
[debug] Launching ::UserDB::Choice::_afterData
[debug] Unable to find enabledMods1 in this context: afterData
[debug] Processing storeHistory
[debug] Processing buildCookie
[debug] Processing code ref
[debug] Launching ::Auth::Choice::_endAuth
[debug] Unable to find enabledMods0 in this context: endAuth
[debug] Processing code ref
[debug] Launching ::UserDB::Choice::_endAuth
[debug] Unable to find enabledMods1 in this context: endAuth
[debug] Processing code ref
[debug] Launching ::Plugins::History::run
[debug] Processing code ref
[debug] Cleaning pdata
[debug] Processing code ref
[debug] Calling autoredirect
[debug] Building redirection to http://test1.example.com
Upgrade process
[debug] Return SSO session 6fbd4860963d66dc41a2f7ef2696354bc72574fa5a047a4d24cfd8e8ecade6ea
[debug] Processing code ref
[debug] Launching ::Auth::Choice::_afterData
[debug] Unable to find enabledMods0 in this context: afterData
[debug] Processing code ref
[debug] Launching ::UserDB::Choice::_afterData
[debug] Unable to find enabledMods1 in this context: afterData
[debug] Processing storeHistory
[debug] Processing buildCookie
[debug] Processing code ref
[debug] Launching ::Auth::Choice::_endAuth
[debug] Unable to find enabledMods0 in this context: endAuth
[debug] Processing code ref
[debug] Launching ::UserDB::Choice::_endAuth
[debug] Unable to find enabledMods1 in this context: endAuth
[debug] Processing code ref
[debug] Launching ::Plugins::History::run
[debug] Processing code ref
[debug] Processing code ref
[debug] Calling autoredirect
[debug] Building redirection to http://test1.example.com
Possible fixes
I think the problem comes from
Do we really need this? Disabling keepPdata makes the problem disappear and no unit tests complain about it.