PAPI Archivos

The PAPI authentication and authorization framework


Opciones: Vista Clásica

Use Monospaced Font
Por defecto enseñar Text Part
Mostrar todas las cabeceras de correo

Tema: [<< Primero] [< Prev] [Siguiente >] [Último >>]

Print Responder
Francisco Jesús Jordano Jiménez <[log in para visualizar]>
Thu, 30 Aug 2007 12:48:00 +0200
text/plain (43 lines)
Hi all,

   Ive found an unwanted feature in PAPI 1.4. Im using standar 
attribute separator (",") and value separator ("="), so i dont specify 
them in the config file.
In my case, when an attribute contains spaces, for example ou=Biblioteca 
Virtual Servicio Andaluz Salud, PAPI splits spaces as attribute 
separator, so i obtain non desired headers:

X-PAPIAttr-ou = Biblioteca
X-PAPIAttr-Virtual = Servicio
X-PAPIAttr-Andaluz = Salud

This problem is fixed applying to the file the next workaround:

sub build_attrList
       my $self=shift;
       my $str=shift;

       my $are='\s*,\s*';
       if (defined $self->{'AttSep'} &&  $self->{'AttSep'} ne "") {
       my $ave='\s*=\s*';
       if (defined $self->{'ValSep'} &&  $self->{'ValSep'} ne "") {

       my @acomp=split (/@/,$str);
       my $asid=pop(@acomp);
       my $spsubj=join('@',@acomp);
       for my $atc (split (/$are/,$spsubj)) {
               push (@{$self->{'attrList'}}, split (/$ave/,$atc,2));
       push (@{$self->{'attrList'}},("PAPIAuthServer",$asid));

Hope this help someone :P

Best regards.