Project

General

Profile

Feature #8361

Add entered name to captive portal status and logs

Added by Fredrik Forsell about 1 year ago. Updated 9 months ago.

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

100%

Estimated time:

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.

History

#1 Updated by Renato Botelho 10 months ago

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

#2 Updated by Renato Botelho 9 months ago

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

PR merged

#3 Updated by A FL 9 months 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.

#4 Updated by Jim Pingle 9 months ago

  • Status changed from Feedback to Resolved

Also available in: Atom PDF