[Mono-bugs] [Bug 385877] New: RolePrincipal.GetRoles returns null on Expired details.
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Fri May 2 02:33:17 EDT 2008
https://bugzilla.novell.com/show_bug.cgi?id=385877
Summary: RolePrincipal.GetRoles returns null on Expired details.
Product: Mono: Class Libraries
Version: SVN
Platform: x86
OS/Version: Linux
Status: NEW
Severity: Normal
Priority: P5 - None
Component: Sys.Web
AssignedTo: mhabersack at novell.com
ReportedBy: ivan at chimerical.com.au
QAContact: mono-bugs at lists.ximian.com
Found By: ---
RolePrincipal updates it's roles based on (!IsRoleListCached && !Expired)
That's to say if either are true, it won't update the _cachedArray before
returning it.
This can return a null to the calling function, causing null reference
expceptions.
I'm not sure of the exact usage of the variables IsRoleListCached & Expired,
but shouldn't the cache be updated if IsRoleListCached is false OR Expired is
true?
I tried to following and it "appeared" to fix my issues.
Index: RolePrincipal.cs
===================================================================
--- RolePrincipal.cs (revision 101789)
+++ RolePrincipal.cs (working copy)
@@ -93,7 +93,7 @@
if (!_identity.IsAuthenticated)
return new string[0];
- if (!IsRoleListCached && !Expired) {
+ if (!IsRoleListCached || Expired) {
_cachedArray = Provider.GetRolesForUser
(_identity.Name);
_cachedRoles = new HybridDictionary (true);
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the mono-bugs
mailing list