Project

General

Profile

« Previous | Next » 

Revision 9628bd1c

Added by Ermal LUÇI about 15 years ago

Actually use the radius WISPr(4) attribute 'url_redirection' if present.

View differences:

usr/local/captiveportal/index.php
244 244

  
245 245
function portal_allow($clientip,$clientmac,$username,$password = null, $attributes = null, $ruleno = null)  {
246 246

  
247
	global $redirurl, $g, $config, $url_redirection, $type, $passthrumac;
247
	global $redirurl, $g, $config, $type, $passthrumac;
248 248

  
249 249
	/* See if a ruleno is passed, if not start locking the sessions because this means there isn't one atm */
250 250
	$captiveshouldunlock = false;
......
405 405
		write_config();
406 406

  
407 407
	/* redirect user to desired destination */
408
	if ($url_redirection)
409
		$my_redirurl = $url_redirection;
408
	if (!empty($attributes['url_redirection']))
409
		$my_redirurl = $attributes['url_redirection'];
410 410
	else if ($config['captiveportal']['redirurl'])
411 411
		$my_redirurl = $config['captiveportal']['redirurl'];
412 412
	else
......
501 501
    unlock($cplock);
502 502
}
503 503

  
504
?>
504
?>

Also available in: Unified diff