[isf-wifidog] Problems on account creation (bug?)

Marcos Tadeu marcos at v2r.com.br
Sam 12 Jan 11:49:01 EST 2008


Hi,

Some time, in realy, many times, the login (login/index.php) send
response to wifidog daemon with wrong "token=", when user create a new
account (signup.php). Then, the user can't navegate and can't access
your email to validation.
I investigate and see that $session->get(SESS_NODE_ID_VAR) return null
in function generateConnectionToken(), line 532 of classes/User.php,
when it is call in signup.php, line 242

Maybe this is because a wrong set in php.ini? I don't know.

I make and test this path. I don known if its is right, but now, all
work well.

=====================
diff -ur /CaptivePort/wifidog-auth/wifidog/signup.php ./signup.php
--- /CaptivePort/wifidog-auth/wifidog/signup.php        2007-09-04
01:15:56.000000000 -0300
+++ ./signup.php        2008-01-12 11:47:38.000000000 -0200
@@ -56,6 +56,17 @@
  require_once('classes/Security.php');
  require_once('classes/MainUI.php');
  require_once('classes/Mail.php');
+
+$session = Session::getObject();  // MT
+$node = $session->get(SESS_NODE_ID_VAR);
+$gw_id = $session->get(SESS_GW_ID_VAR);
+if (!empty($gw_id) && empty($node)) {
+    $node = Node::getObjectByGatewayId($gw_id);
+    if($node) {
+        $session->set(SESS_NODE_ID_VAR, $node->getId());
+    }
+}
+
  $smarty = SmartyWifidog::getObject();
  /**
   * Load custom signup URL if it has been defined in config.php
===========================
-- 
Marcos Tadeu
V2R Consultoria e Informática
Segurança da Informação
http://www.LimpaMail.com.br
http://www.v2r.com.br



Plus d'informations sur la liste de diffusion WiFiDog