[Mono-bugs] [Bug 59683][Min] Changed - Setting Context.User does not update Thread.CurrentPrincipal
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Wed, 9 Jun 2004 19:56:55 -0400 (EDT)
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by sebastien@ximian.com.
http://bugzilla.ximian.com/show_bug.cgi?id=59683
--- shadow/59683 2004-06-08 02:30:42.000000000 -0400
+++ shadow/59683.tmp.9714 2004-06-09 19:56:55.000000000 -0400
@@ -138,6 +138,27 @@
I reopened the bug since I dont really want to check out CVS and
compile everything by hand (it gave me quite some trouble a few months
ago so I usually stick to the distributions). Sorry for being lazy.
Anyway I am really impressed with the prompt response and the quick
resolution. Thumbs up!!!
+
+------- Additional Comments From sebastien@ximian.com 2004-06-09 19:56 -------
+Patch was reverted - the behaviour wasn't compatible with MS (for
+every case). Thanksfully we have someone who figured it out
+
+from mono-devel-list...
+
+Time to help.. ;-)
+
+MS does NOT set the principal when calling Context.User = Principal
+but it does when executing a new step in the execution pipeline in
+HttpApplication. So, setting the principal in an event changes the
+principal after the event is executed but before the page is executed.
+
+This would be easy to fix in our implementation, we just need to track
+the principal in the state machine (same as culture info). Make sure
+that we set the principal from context.user when entering a thread
+(saving current) and restore when leaving (to the saved).
+
+Cheers,
+ Patrik Torstensson