[Bps-public-commit] r20269 - RT-Authen-ExternalAuth/trunk/lib/RT/Authen
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Fri Feb 18 02:42:11 EST 2011
Author: sunnavy
Date: Fri Feb 18 02:42:11 2011
New Revision: 20269
Modified:
RT-Authen-ExternalAuth/trunk/lib/RT/Authen/ExternalAuth.pm
Log:
Login has been moved to /NoAuth, we need to prevent MaybeShowNoAuthPage returning page directly when people submit the login form
Modified: RT-Authen-ExternalAuth/trunk/lib/RT/Authen/ExternalAuth.pm
==============================================================================
--- RT-Authen-ExternalAuth/trunk/lib/RT/Authen/ExternalAuth.pm (original)
+++ RT-Authen-ExternalAuth/trunk/lib/RT/Authen/ExternalAuth.pm Fri Feb 18 02:42:11 2011
@@ -545,4 +545,19 @@
}
+{
+ if ( $RT::VERSION gt '3.8.8' ) {
+ no warnings 'redefine';
+ require RT::Interface::Web;
+ my $orig = \&RT::Interface::Web::MaybeShowNoAuthPage;
+ *RT::Interface::Web::MaybeShowNoAuthPage = sub {
+ my $m = $HTML::Mason::Commands::m;
+ return
+ if $m->base_comp->path eq '/NoAuth/Login.html'
+ && $m->cgi_object->request_method eq 'POST';
+ return $orig->(@_);
+ };
+ }
+}
+
1;
More information about the Bps-public-commit
mailing list