Ticket #420 (new Bug report)

Opened 10 years ago

Last modified 10 years ago

wifidog daemon receive null token, in first connection

Reported by: wifidog@… Owned by:
Priority: normal Milestone: Not yet assigned to a Milestone
Component: Auth server, Authentication, permissions and access control Version:
Keywords: Cc:

Description

Hi,

In first connection, after user create an account with signup.php, the login (login/index.php) send response to wifidog daemon with wrong "token=". 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 I have a wrong set in php.ini(?). I don't know... But I make and test this path. Now, for me, all work well.

Thanks.

=====================

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

===========================

Note: See TracTickets for help on using tickets.