Project

General

Profile

Actions

Feature #8361

closed

Add entered name to captive portal status and logs

Added by Fredrik Forsell over 6 years ago. Updated over 6 years ago.

Status:
Resolved
Priority:
Low
Category:
Captive Portal
Target version:
Start date:
03/07/2018
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
Release Notes:

Description

When using the captive portal with "Authentication: None", it would be useful to log the name the person enters in the portal, and not allow an empty name. This makes identifying a session much easier.

Actions #1

Updated by Renato Botelho over 6 years ago

  • Status changed from New to In Progress
  • Assignee set to Renato Botelho
  • Target version set to 2.4.4
Actions #2

Updated by Renato Botelho over 6 years ago

  • Status changed from In Progress to Feedback
  • % Done changed from 0 to 100

PR merged

Actions #3

Updated by A FL over 6 years ago

I confirm that the fix is working. Name of the user is now recorded in captiveportal status and logs on last snapshot.

Also, if you want to forbid empty names, i suggest to create a custom login page that block empty names using javascript.
If you really want to forbid empty names, you could include a patch at the begining of /usr/local/captiveportal/index.php

if (empty ($_POST['auth_user']) || $_POST['auth_user']==='unauthenticated') {

    log_error("Submission to captiveportal with empty user name");

    portal_reply_page(null, "error", gettext("Empty names forbidden"));

    ob_flush();

    return; 
}

This issue can be marked as resolved.

Actions #4

Updated by Jim Pingle over 6 years ago

  • Status changed from Feedback to Resolved
Actions

Also available in: Atom PDF