LEMONLDAP::NG : new: port is now checked in HTTP redirections.

This commit is contained in:
Xavier Guimard 2007-04-23 19:23:35 +00:00
parent f2b6043495
commit 4a8c99c7b0
2 changed files with 12 additions and 5 deletions

View File

@ -2,8 +2,9 @@ lemonldap-ng (0.8.1.2) unstable; urgency=low
* Little bug fix if whatToTrace parameter is not defined and display it in
Manager interface
* New: port is now checked in portal redirection
-- Xavier Guimard <x.guimard@free.fr> Sat, 21 Apr 2007 15:05:19 +0200
-- Xavier Guimard <x.guimard@free.fr> Mon, 23 Apr 2007 21:20:24 +0200
lemonldap-ng (0.8.1.1) unstable; urgency=low

View File

@ -332,9 +332,9 @@ sub defaultValuesInit {
my ( $class, $args ) = @_;
# Other values
$cookieName = $args->{cookieName} || 'lemonldap';
$cookieSecured = $args->{cookieSecured} || 0;
$whatToTrace = $args->{whatToTrace} || '$uid';
$cookieName = $args->{cookieName} || 'lemonldap';
$cookieSecured = $args->{cookieSecured} || 0;
$whatToTrace = $args->{whatToTrace} || '$uid';
$whatToTrace =~ s/\$//g;
$https = $args->{https} unless defined($https);
$https = 1 unless defined($https);
@ -429,12 +429,18 @@ sub hideCookie {
# Redirect non-authenticated users to the portal
sub goToPortal() {
my ( $class, $url, $arg ) = @_;
my $port = $apacheRequest->get_server_port();
$port =
( $https && $port == 443 ) ? ''
: ( !$https && $port == 80 ) ? ''
: ':' . $apacheRequest->get_server_port();
my $urlc_init =
encode_base64( "http"
. ( $https ? "s" : "" ) . "://"
. $apacheRequest->get_server_name()
. $port
. $url );
$urlc_init =~ s/[\n\s]//g;
$urlc_init =~ s/[\n\s]//sg;
$class->lmLog(
"Redirect "
. $apacheRequest->connection->remote_ip