[MAGNOLIA-1839] can't read anonymous user after a session timeout Created: 14/Nov/07 Updated: 23/Jan/13 Resolved: 15/Nov/07 |
|
| Status: | Closed |
| Project: | Magnolia |
| Component/s: | None |
| Affects Version/s: | 3.5 RC1 |
| Fix Version/s: | 3.5 RC1 |
| Type: | Bug | Priority: | Blocker |
| Reporter: | Philipp Bärfuss | Assignee: | Philipp Bärfuss |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Template: |
|
| Acceptance criteria: |
Empty
|
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
| Bug DoR: |
[ ]*
Steps to reproduce, expected, and actual results filled
[ ]*
Affected version filled
|
| Date of First Response: |
| Description |
|
Regarding to a report the anonymous user can't get read after a session timeout of the http session. Might be that the following happens:
The reported exception is: ERROR info.magnolia.cms.security.SystemUserManager 14.11.2007 15:21:11 – Failed to login as anonymous user Then we end up in that ERROR info.magnolia.cms.security.SystemUserManager 14.11.2007 15:21:11 – Failed to get system or anonymous user [anonymous], will try to create new system user with default password |
| Comments |
| Comment by Philipp Bracher [ 15/Nov/07 ] |
|
I was able to reproduce the issue by hammering the system: It ended up in an endles loop in getAnonymousUser() and getAnonymousSubject(). First I will try to remove the recursion on failing. It looks like the createUserNode is failing because the system realm is null (not set). It might be that the very first exception is caused by the same problem because it ties to read the user in the wrong realm. Here is the relevant exceptino extract: INFO info.magnolia.cms.security.MgnlUserManager MgnlUserManager.java(createUser:215) 15.11.2007 11:48:11 can't create user [anonymous] |
| Comment by Philipp Bracher [ 15/Nov/07 ] |
|
it this shows the endless loop: at info.magnolia.cms.security.SystemUserManager.getOrCreateUser(SystemUserManager.java:120) |
| Comment by Magnolia International [ 15/Nov/07 ] |
|
Talking about endless loops, there's also a potential one at AbstractContext.getLocale() - probably not related here, but might be worth taking into account when solving this. |
| Comment by ashapochka [ 15/Nov/07 ] |
|
Per Philipp's endless loop comment, it can be solved by passing anon user name/password explicitly to overloaded getAnonymousSubject I think, and AbstractContext.getLocale() can be overriden in the system context to return Locale.ENGLISH unless the locale is not null. |
| Comment by ashapochka [ 15/Nov/07 ] |
|
Resolved as described in my preceding comment. |
| Comment by Magnolia International [ 15/Nov/07 ] |
|
Please use Locale.getDefault() instead |
| Comment by ashapochka [ 15/Nov/07 ] |
|
seems to be a partial solution only (just for the loop part) |
| Comment by ashapochka [ 15/Nov/07 ] |
|
> Please use Locale.getDefault() instead done |
| Comment by Philipp Bracher [ 15/Nov/07 ] |
|
infinity loop fixed. realm is null save. |