Subversion Repositories ALCASAR

Rev

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

Rev 3038 Rev 3085
Line 1... Line 1...
1
<?php
1
<?php
2
# $Id: intercept.php 3038 2022-07-10 22:46:48Z rexy $
2
# $Id: intercept.php 3085 2022-11-02 17:02:32Z rexy $
3
#
3
#
4
# intercept.php for ALCASAR captive portal
4
# intercept.php for ALCASAR captive portal
5
# By Mondru AB.
5
# By Mondru AB.
6
# Modify by Rexy & steweb57
6
# Modify by Rexy & steweb57
7
# UI & css style by Stéphane ERARD & Alexandre VEZIN
7
# UI & css style by Stéphane ERARD & Alexandre VEZIN
Line 441... Line 441...
441
// If attempt to login
441
// If attempt to login
442
if ($button === $l_boutonO) {
442
if ($button === $l_boutonO) {
443
	//correction password length in coova-chilli
443
	//correction password length in coova-chilli
444
	//thanks to http://www.stochasticgeometry.ie/2009/09/09/maximum-password-length-in-coova-chilli/
444
	//thanks to http://www.stochasticgeometry.ie/2009/09/09/maximum-password-length-in-coova-chilli/
445
	$hexchal = pack('H*', $challenge);
445
	$hexchal = pack('H*', $challenge);
446
	$newchal = pack('H*', md5($hexchal . $uamsecret));
446
	$newchal = pack('H*', hash('sha256',$hexchal . $uamsecret));
447
 
447
 
448
	// If challenge isn't long enough, repeat it until it is
448
	// If challenge isn't long enough, repeat it until it is
449
	while (strlen($newchal) < strlen($password)) {
449
	while (strlen($newchal) < strlen($password)) {
450
		$newchal .= $newchal;
450
		$newchal .= $newchal;
451
	}
451
	}