Subversion Repositories ALCASAR

Rev

Rev 2406 | Rev 2409 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 2406 Rev 2407
Line 1... Line 1...
1
<?php
1
<?php
2
# $Id: intercept.php 2406 2017-09-10 16:47:59Z tom.houdayer $
2
# $Id: intercept.php 2407 2017-09-13 08:41:59Z tom.houdayer $
3
#
3
#
4
# intercept.php for ALCASAR captive portal
4
# intercept.php for ALCASAR captive portal
5
# Copyright (C) 2003, 2004 Mondru AB.
5
# Copyright (C) 2003, 2004 Mondru AB.
6
# Modify by REXY & steweb57
6
# Modify by REXY & steweb57
7
# UI & css style by stephane ERARD
7
# UI & css style by stephane ERARD
Line 369... Line 369...
369
}
369
}
370
 
370
 
371
# Read form parameters which we care about
371
# Read form parameters which we care about
372
# avoid the "user as a MAC address" attempts
372
# avoid the "user as a MAC address" attempts
373
if ((isset($_POST['username'])) && (preg_match('/^([0-9A-F]{2}-){5}[0-9A-F]{2}$/', $_POST['username']) !== 1))
373
if ((isset($_POST['username'])) && (preg_match('/^([0-9A-F]{2}-){5}[0-9A-F]{2}$/', $_POST['username']) !== 1))
374
				$username	= htmlspecialchars($_POST['username']);		else $username = '';
374
				$username	= htmlspecialchars(trim($_POST['username']));	else $username = '';
375
if (isset($_POST['password']))	$password	= htmlspecialchars($_POST['password']);		else $password = '';
375
if (isset($_POST['password']))	$password	= htmlspecialchars($_POST['password']);		else $password = '';
376
if (isset($_POST['challenge']))	$challenge	= htmlspecialchars($_POST['challenge']);	else $challenge = '';
376
if (isset($_POST['challenge']))	$challenge	= htmlspecialchars($_POST['challenge']);	else $challenge = '';
377
if (isset($_POST['button']))	$button		= htmlspecialchars($_POST['button']);		else $button = '';
377
if (isset($_POST['button']))	$button		= htmlspecialchars($_POST['button']);		else $button = '';
378
// if (isset($_POST['logout']))	$logout		= htmlspecialchars($_POST['logout']);		else $logout = '';
378
// if (isset($_POST['logout']))	$logout		= htmlspecialchars($_POST['logout']);		else $logout = '';
379
// if (isset($_POST['prelogin']))	$prelogin	= htmlspecialchars($_POST['prelogin']);		else $prelogin = '';
379
// if (isset($_POST['prelogin']))	$prelogin	= htmlspecialchars($_POST['prelogin']);		else $prelogin = '';