[Rt-commit] rt branch, 3.8-trunk, updated. rt-3.8.5-187-g54766e9
jesse
jesse at bestpractical.com
Tue Sep 29 18:57:46 EDT 2009
The branch, 3.8-trunk has been updated
via 54766e95fbd8ab293304dc3f8009ec826822a85d (commit)
via 8cb0d8719efa883c98eaa1ae61fd65b2ab3107c5 (commit)
from 6e6c49bc823caebb2699630a758ece3aac263816 (commit)
Summary of changes:
lib/RT/Interface/Web.pm | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
- Log -----------------------------------------------------------------
commit 8cb0d8719efa883c98eaa1ae61fd65b2ab3107c5
Author: Jesse Vincent <jesse at bestpractical.com>
Date: Wed Sep 30 07:57:03 2009 +0900
SaveSessionCookie updated to SendSessionCookie
diff --git a/lib/RT/Interface/Web.pm b/lib/RT/Interface/Web.pm
index 4205e2c..30c33ff 100755
--- a/lib/RT/Interface/Web.pm
+++ b/lib/RT/Interface/Web.pm
@@ -190,7 +190,7 @@ sub HandleRequest {
MaybeShowInstallModePage();
$HTML::Mason::Commands::m->comp( '/Elements/SetupSessionCookie', %$ARGS );
- SaveSessionCookie();
+ SendSessionCookie();
$HTML::Mason::Commands::session{'CurrentUser'} = RT::CurrentUser->new() unless _UserLoggedIn();
MaybeShowNoAuthPage($ARGS);
@@ -282,6 +282,7 @@ sub MaybeShowNoAuthPage {
# If it's a noauth file, don't ask for auth.
my $m = $HTML::Mason::Commands::m;
if ( $m->base_comp->path =~ RT->Config->Get('WebNoAuthRegex') ) {
+ SendSessionCookie();
$m->comp( { base_comp => $m->request_comp }, $m->fetch_next, %$ARGS );
$m->abort;
}
@@ -299,10 +300,12 @@ can only see self-service pages.
sub ShowRequestedPage {
my $ARGS = shift;
- # If the user isn't privileged, they can only see SelfService
- #
my $m = $HTML::Mason::Commands::m;
+ SendSessionCookie();
+
+
+ # If the user isn't privileged, they can only see SelfService
unless ( $HTML::Mason::Commands::session{'CurrentUser'}->Privileged ) {
# if the user is trying to access a ticket, redirect them
@@ -473,7 +476,7 @@ sub InstantiateNewSession {
}
-sub SaveSessionCookie {
+sub SendSessionCookie {
my $cookie = new CGI::Cookie(
-name => _SessionCookieName(),
-value => $HTML::Mason::Commands::session{_session_id},
commit 54766e95fbd8ab293304dc3f8009ec826822a85d
Author: Jesse Vincent <jesse at bestpractical.com>
Date: Wed Sep 30 07:57:24 2009 +0900
Fresh clean sessions at login
diff --git a/lib/RT/Interface/Web.pm b/lib/RT/Interface/Web.pm
index 30c33ff..bd2de70 100755
--- a/lib/RT/Interface/Web.pm
+++ b/lib/RT/Interface/Web.pm
@@ -343,7 +343,6 @@ sub AttemptExternalAuth {
my $orig_user = $user;
$user = RT::Interface::Web::WebCanonicalizeInfo();
- $HTML::Mason::Commands::session{'CurrentUser'} = RT::CurrentUser->new();
my $load_method = RT->Config->Get('WebExternalGecos') ? 'LoadByGecos' : 'Load';
if ( $^O eq 'MSWin32' and RT->Config->Get('WebExternalGecos') ) {
@@ -351,6 +350,7 @@ sub AttemptExternalAuth {
$user =~ s/^\Q$NodeName\E\\//i;
}
+ InstantiateNewSession();
$HTML::Mason::Commands::session{'CurrentUser'} = RT::CurrentUser->new();
$HTML::Mason::Commands::session{'CurrentUser'}->$load_method($user);
@@ -432,6 +432,7 @@ sub AttemptPasswordAuthentication {
}
$RT::Logger->info("Successful login for @{[$ARGS->{user}]} from $ENV{'REMOTE_ADDR'}");
+ InstantiateNewSession();
$HTML::Mason::Commands::session{'CurrentUser'} = $user_obj;
$m->callback( %$ARGS, CallbackName => 'SuccessfulLogin', CallbackPage => '/autohandler' );
}
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list