* Crypto was usable only with 16xn characters
 * Menu was not able to filter embedded <application>
Google page speed :
 * optimize images
 * set size
This commit is contained in:
Xavier Guimard 2009-08-20 14:19:40 +00:00
parent bfebb497a1
commit 444e093004
11 changed files with 77 additions and 36 deletions

View File

@ -1,3 +1,10 @@
lemonldap-ng (0.9.5) unstable; urgency=low
* Bugs :
- bad XML filter when embedding <application> in <application> tags
-- Xavier Guimard <x.guimard@free.fr> Wed, 12 Aug 2009 11:07:18 +0200
lemonldap-ng (0.9.4) unstable; urgency=low lemonldap-ng (0.9.4) unstable; urgency=low
* Bugs : * Bugs :

View File

@ -1,5 +1,5 @@
lemonldap-ng (0.9.4-0) unstable; urgency=low lemonldap-ng (0.9.5-0) unstable; urgency=low
* Local build * Local build
-- Xavier Guimard <x.guimard@free.fr> Sat, 17 Jan 2009 13:39:50 +0100 -- Xavier Guimard <x.guimard@free.fr> Wed, 12 Aug 2009 11:08:42 +0200

View File

@ -30,9 +30,13 @@ sub new {
# @param data datas to encrypt # @param data datas to encrypt
# @return encrypted datas in Base64 format # @return encrypted datas in Base64 format
sub encrypt { sub encrypt {
my $self = shift; my ( $self, $str ) = @_;
my $tmp; my $tmp;
eval { $tmp = encode_base64( $self->SUPER::encrypt(@_), '' ); }; eval {
$tmp = encode_base64(
$self->SUPER::encrypt( $str . "\0" x ( 16 - length($str) % 16 ) ),
'' );
};
if ($@) { if ($@) {
$msg = "Crypt::Rijndael error : $@"; $msg = "Crypt::Rijndael error : $@";
return undef; return undef;
@ -60,6 +64,10 @@ sub decrypt {
} }
else { else {
$msg = ''; $msg = '';
# Obscure Perl re bug...
$tmp .="\0";
$tmp =~ s/\0*$//;
return $tmp; return $tmp;
} }
} }

View File

@ -1,6 +1,6 @@
--- #YAML:1.0 --- #YAML:1.0
name: Lemonldap-NG-Portal name: Lemonldap-NG-Portal
version: 0.88 version: 0.89
abstract: The authentication portal part of Lemonldap::NG Web-SSO abstract: The authentication portal part of Lemonldap::NG Web-SSO
license: ~ license: ~
author: author:

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.2 KiB

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -1,6 +1,6 @@
<div id="footer"> <div id="footer">
<a href="http://validator.w3.org/check?uri=referer"><img src="skins/common/valid-xhtml10-blue.png" alt="Valid XHTML 1.0" /></a> <a href="http://validator.w3.org/check?uri=referer"><img src="skins/common/valid-xhtml10-blue.png" width="88" height="31" alt="Valid XHTML 1.0" /></a>
<a href="http://jigsaw.w3.org/css-validator/"><img src="skins/common/vcss-blue.gif" alt="Valid CSS" /></a> <a href="http://jigsaw.w3.org/css-validator/"><img src="skins/common/vcss-blue.gif" width="88" height="31" alt="Valid CSS" /></a>
</div> </div>
</div> </div>

View File

@ -8,13 +8,13 @@
<ul> <ul>
<TMPL_IF NAME="DISPLAY_APPSLIST"> <TMPL_IF NAME="DISPLAY_APPSLIST">
<li><a href="#appslist"><span><img src="skins/common/application_cascade.png" alt="appslist" /> <lang en="Your applications" fr="Vos applications" /></span></a></li> <li><a href="#appslist"><span><img src="skins/common/application_cascade.png" width="16" height="16" alt="appslist" /> <lang en="Your applications" fr="Vos applications" /></span></a></li>
</TMPL_IF> </TMPL_IF>
<TMPL_IF NAME="DISPLAY_PASSWORD"> <TMPL_IF NAME="DISPLAY_PASSWORD">
<li><a href="#password"><span><img src="skins/common/vcard_edit.png" alt="password" /> <lang en="Password" fr="Mot de passe" /></span></a></li> <li><a href="#password"><span><img src="skins/common/vcard_edit.png" width="16" height="16" alt="password" /> <lang en="Password" fr="Mot de passe" /></span></a></li>
</TMPL_IF> </TMPL_IF>
<TMPL_IF NAME="DISPLAY_LOGOUT"> <TMPL_IF NAME="DISPLAY_LOGOUT">
<li><a href="#logout"><span><img src="skins/common/door_out.png" alt="logout" /> <lang en="Logout" fr="D&eacute;connexion" /></span></a></li> <li><a href="#logout"><span><img src="skins/common/door_out.png" width="16" height="16" alt="logout" /> <lang en="Logout" fr="D&eacute;connexion" /></span></a></li>
</TMPL_IF> </TMPL_IF>
</ul> </ul>

View File

@ -357,9 +357,23 @@ sub _displayDescription {
sub _filterXML { sub _filterXML {
my $self = shift; my $self = shift;
my ($root) = @_; my ($root) = @_;
my @cat = $root->getElementsByTagName('category');
foreach my $cat (@cat) {
$self->_filterApp($cat);
}
my @apps = $root->getElementsByTagName('application'); # Hide empty categories
foreach (@apps) { $self->_hideEmptyCategory($root);
return;
}
sub _filterApp {
my($self,$node)=@_;
my @apps = $node->getChildrenByTagName('application');
my $tag = 0;
foreach(@apps) {
my $stag = $self->_filterApp($_);
my $appdisplay = $_->getChildrenByTagName('display')->string_value(); my $appdisplay = $_->getChildrenByTagName('display')->string_value();
my $appuri = my $appuri =
$self->_userParam( $_->getChildrenByTagName('uri')->string_value() ); $self->_userParam( $_->getChildrenByTagName('uri')->string_value() );
@ -368,17 +382,26 @@ sub _filterXML {
$_->unbindNode if ( $appdisplay eq "no" ); $_->unbindNode if ( $appdisplay eq "no" );
# Keep node if display is "yes" # Keep node if display is "yes"
next if ( $appdisplay eq "yes" ); if ( $appdisplay eq "yes" ) {
$tag++;
next;
}
# Check grant function if display is "auto" (this is the default) # Check grant function if display is "auto" (this is the default)
$_->unbindNode unless ( $self->_grant($appuri) ); unless ( $self->_grant($appuri) ) {
if($stag) {
eval {$_->getChildrenByTagName('uri')->unbindNode() };
$tag++;
}
else {
$_->unbindNode;
}
}
else {
$tag++;
}
} }
return $tag;
# Hide empty categories
$self->_hideEmptyCategory($root);
return;
} }
## @method private void _hideEmptyCategory(XML::LibXML::Element cat) ## @method private void _hideEmptyCategory(XML::LibXML::Element cat)
@ -443,7 +466,7 @@ sub _ppolicyWarning {
sub _grant { sub _grant {
my $self = shift; my $self = shift;
my ($uri) = @_; my ($uri) = @_;
$uri =~ m{(\w+)://([^/:]+)(:\d+)?(/.*)?$}; $uri =~ m{(\w+)://([^/:]+)(:\d+)?(/.*)?$} or return 0;
my ( $protocol, $vhost, $port ); my ( $protocol, $vhost, $port );
( $protocol, $vhost, $port, $path ) = ( $1, $2, $3, $4 ); ( $protocol, $vhost, $port, $path ) = ( $1, $2, $3, $4 );
$path ||= '/'; $path ||= '/';

View File

@ -140,12 +140,12 @@ sub new {
# Authentication and userDB module are required and have to be in @ISA # Authentication and userDB module are required and have to be in @ISA
foreach (qw(authentication userDB passwordDB)) { foreach (qw(authentication userDB passwordDB)) {
my $tmp = my $tmp = 'Lemonldap::NG::Portal::'
'Lemonldap::NG::Portal::' . (
. ( $_ eq 'userDB' $_ eq 'userDB'
? 'UserDB' ? 'UserDB'
: ( $_ eq 'passwordDB' ? 'PasswordDB' : 'Auth' ) ) : ( $_ eq 'passwordDB' ? 'PasswordDB' : 'Auth' )
. $self->{$_}; ) . $self->{$_};
$tmp =~ s/\s.*$//; $tmp =~ s/\s.*$//;
eval "require $tmp"; eval "require $tmp";
$self->abort( "Configuration error", $@ ) if ($@); $self->abort( "Configuration error", $@ ) if ($@);
@ -231,6 +231,7 @@ sub setDefaultValues {
my $self = shift; my $self = shift;
$self->{whatToTrace} ||= 'uid'; $self->{whatToTrace} ||= 'uid';
$self->{whatToTrace} =~ s/^\$//; $self->{whatToTrace} =~ s/^\$//;
$self->{httpOnly} = 1 unless ( defined( $self->{httpOnly} ) );
} }
=begin WSDL =begin WSDL
@ -825,21 +826,23 @@ sub buildCookie {
my $self = shift; my $self = shift;
push @{ $self->{cookie} }, push @{ $self->{cookie} },
$self->cookie( $self->cookie(
-name => $self->{cookieName}, -name => $self->{cookieName},
-value => $self->{id}, -value => $self->{id},
-domain => $self->{domain}, -domain => $self->{domain},
-path => "/", -path => "/",
-secure => $self->{securedCookie}, -secure => $self->{securedCookie},
-httponly => $self->{httpOnly},
@_, @_,
); );
if ( $self->{securedCookie} == 2 ) { if ( $self->{securedCookie} == 2 ) {
push @{ $self->{cookie} }, push @{ $self->{cookie} },
$self->cookie( $self->cookie(
-name => $self->{cookieName} . "http", -name => $self->{cookieName} . "http",
-value => $self->{sessionInfo}->{_httpSession}, -value => $self->{sessionInfo}->{_httpSession},
-domain => $self->{domain}, -domain => $self->{domain},
-path => "/", -path => "/",
-secure => 0, -secure => 0,
-httponly => $self->{httpOnly},
@_, @_,
); );
} }