[isf-wifidog] logout with radius

kaouete kaouete at crazydwarves.org
Sam 2 Juil 04:49:29 EDT 2005


and it looks like it is needed tot ransform the strtotime() into a
time() too :>

I would like to know if this "report and patch" is treated by
wifidog team, and if yes, when will we be able to have a correct
solution (because mine is a little ugly :) in cvs.

Thanks,

kaouete

On Tue, Jun 28, 2005 at 01:41:57PM +0200, kaouete wrote:
> So,
> 
> there is my little patch,
> 
> i dont know if things are done right, but i guess it's ok :>
> 
> Please verify anyway :]
> 
> cvs diff -u AuthenticatorRadius.php User.php :
> 
> Index: AuthenticatorRadius.php
> ===================================================================
> RCS file:
> /cvsroot/wifidog/wifidog-auth/wifidog/classes/AuthenticatorRadius.php,v
> retrieving revision 1.6
> diff -u -r1.6 AuthenticatorRadius.php
> --- AuthenticatorRadius.php     4 Apr 2005 14:52:43 -0000
> 1.6
> +++ AuthenticatorRadius.php     28 Jun 2005 11:38:59 -0000
> @@ -294,7 +294,7 @@
> 
>                 // RADIUS accounting stop
>                 // Session is completely based on Database time
> -               $session_time = strtotime($info['now']) - strtotime($info['timestamp_in']);
> +               $session_time = strtotime() - strtotime($info['timestamp_in']);
> 
>                 $radius_acct = new Auth_RADIUS_Acct_Stop;
>                 $radius_acct->addServer($this->mRadius_hostname,$this->mRadius_acct_port, $this->mRadius_secret_key);
> Index: User.php
> ===================================================================
> RCS file: /cvsroot/wifidog/wifidog-auth/wifidog/classes/User.php,v
> retrieving revision 1.23
> diff -u -r1.23 User.php
> --- User.php    27 May 2005 14:43:07 -0000      1.23
> +++ User.php    28 Jun 2005 11:38:59 -0000
> @@ -511,7 +511,7 @@
>                         if ($connections)
>                                 foreach ($connections as
> $connection)
>                                         if
> ($connection['token_status'] == TOKEN_UNUSED || $connection['token_status'] == TOKEN_INUSE)
> -                                               Network ::getCurrentNetwork()->getAuthenticator()->logout(array('conn_id' => $connection['conn_id']), $errmsg);
> +                                               Network ::getCurrentNetwork()->getAuthenticator()->logout($connection,$errmsg);
>                 }
>                 catch (Exception $e)
>                 {
> 
> 
> kaouete
> 
> On Mon, Jun 27, 2005 at 04:59:54PM -0700, Francois Proulx wrote:
> > I'll have to check this, I wrote the code 3 months ago. I don't have a RADIUS on hand for testing though...
> > 
> > This mights take a while, but it is either a bug or it sound like the session does not contain the database row was empty for some reason... I don't have the code handy, this is only from what I see here...
> > 
> > Feel free to propose any patch if you see what's wrong
> > 
> > >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
> > 
> > Hi,
> > 
> > I have user auth by a radius server.
> > I log in with it, there is no problem, but when i logout, i get
> > these error :
> > 
> > Notice: Undefined index: now in
> > /var/www/wifidog/classes/AuthenticatorRadius.php on line 297
> > 
> > Warning: strtotime() [function.strtotime]: Called with an empty
> > time parameter. in
> > /var/www/wifidog/classes/AuthenticatorRadius.php on line 297
> > 
> > Notice: Undefined index: timestamp_in in
> > /var/www/wifidog/classes/AuthenticatorRadius.php on line 297
> > 
> > Warning: strtotime() [function.strtotime]: Called with an empty
> > time parameter. in
> > /var/www/wifidog/classes/AuthenticatorRadius.php on line 297
> > 
> > Notice: Undefined index: username in
> > /var/www/wifidog/classes/AuthenticatorRadius.php on line 302
> 
> > _______________________________________________
> > WiFiDog mailing list
> > WiFiDog at listes.ilesansfil.org
> > http://listes.ilesansfil.org/cgi-bin/mailman/listinfo/wifidog



> _______________________________________________
> WiFiDog mailing list
> WiFiDog at listes.ilesansfil.org
> http://listes.ilesansfil.org/cgi-bin/mailman/listinfo/wifidog
-------------- section suivante --------------
Une pièce jointe non texte a été nettoyée...
Nom: non disponible
Type: application/pgp-signature
Taille: 189 octets
Desc: Digital signature
Url: http://listes.ilesansfil.org/pipermail/wifidog/attachments/20050702/add1b69d/attachment.pgp


More information about the WiFiDog mailing list