I'll explain what happened using the old code :
Note : this part does not exist any more in the 2.4.5 version :
if (!empty($cpcfg['redirurl'])) {
$redirurl = $cpcfg['redirurl'];
} elseif (preg_match("/redirurl=(.*)/", $orig_request, $matches)) {
$redirurl = urldecode($matches[1]);
} elseif ($_REQUEST['redirurl']) {
$redirurl = $_REQUEST['redirurl'];
}
If "$cpcfg['redirurl']" exists, then set the rediction to that value.
You could have set "$cpcfg['redirurl']" like this :
4b39045a-fdbc-4a05-88a1-f1a315a0a6de-image.png
Else, if there was an original URL 'redirurl' paramter, it was stored in "$orig_request, and use that
Else, if the special PHP $_REQUEST exists, it's a PHP super global variable which is used to collect data after submitting an HTML form, with an item called 'redirurl', then that one is used.
So, before 2.4.5, when you set "After authentication Redirection URL" in the captive portal settings, browser get redirected to that URL, no matter what.
As of 2.4.5, things have been re ordered :
First this is looked up in the URL :
redirurl=(.*)
where .* (dot star) can be "any possible string", normally some ting like "http://www.msn.com" - if it exists, it has a (one) match, the match is used to set the redirurl, the variable to be used to redirect the browser.
( this is the same test above at step 2 - explained using others words)
If not, the $_REQUEST['redirurl'] is tested, and if present, used.
If not, finally, the $cpcfg['redirurl'] is used, the URL we had set up in our captive portal settings.
As you can see, it's all the same, but different order.
Which means that portal visitors are now not redirected any more to what we as pfSense admins decided. It's what the browser (user) wanted to visit initially what is being used now.
If that doesn't exist == unknown, the captive's portal admin's choice is used.