You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@shiro.apache.org by "Lenny Primak (Jira)" <ji...@apache.org> on 2024/04/12 18:23:00 UTC
[jira] [Resolved] (SHIRO-875) Cannot create subjects with principals and disabled session-creation
[ https://issues.apache.org/jira/browse/SHIRO-875?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Lenny Primak resolved SHIRO-875.
--------------------------------
Fix Version/s: 2.0.1
Resolution: Fixed
> Cannot create subjects with principals and disabled session-creation
> --------------------------------------------------------------------
>
> Key: SHIRO-875
> URL: https://issues.apache.org/jira/browse/SHIRO-875
> Project: Shiro
> Issue Type: Bug
> Affects Versions: 1.9.0
> Reporter: Boris Petrov
> Priority: Major
> Fix For: 2.0.1
>
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> {code:java}
> var principals = new SimplePrincipalCollection(123, "asd");
> var subject = new Subject.Builder().principals(principals).sessionCreationEnabled(false).buildSubject();
> {code}
> This fails because the `DefaultSecurityManager` calls `save(subject);` which in turn saves something to the session of the subject. But a session can't be created so this blows up.
> Is this by design or is it a bug?
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@shiro.apache.org
For additional commands, e-mail: issues-help@shiro.apache.org