[isf-wifidog] logout with radius

kaouete kaouete at crazydwarves.org
Mar 28 Juin 07:41:57 EDT 2005


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
-------------- 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/20050628/050b8eb9/attachment.pgp


More information about the WiFiDog mailing list