updated portal so that it forwards to the originally requested address, like in the past

main
fuzzykitten 2025-03-08 08:31:49 -05:00
parent 9716edf454
commit ed023c514f
1 changed files with 4 additions and 3 deletions

View File

@ -256,11 +256,13 @@ function check_portal($db, $settings, $ip)
for ($i = 0; $i < 20; $i++) { for ($i = 0; $i < 20; $i++) {
// token length is set to 20 characters // token length is set to 20 characters
$index = random_int(0, 51); $index = random_int(0, 51);
// we have 62 to choose, so 0 to 61 // we have 52 to choose, so 0 to 51
$random_string .= $characters[$index]; $random_string .= $characters[$index];
} }
$request = '/' . $random_string; // $request = '/' . $random_string;
$request = $_SERVER['REQUEST_URI'] . $random_string;
header( 'HTTP/1.1 202 Accepted' ); header( 'HTTP/1.1 202 Accepted' );
header( 'Cache-Control: no-store', FALSE ); header( 'Cache-Control: no-store', FALSE );
@ -393,7 +395,6 @@ function post_block_bot($db, $settings, $visitor_ip)
// portal took over // portal took over
function redirect_target() function redirect_target()
{ {
//REWRITE ? Always goes to landing page now.
$target = $_POST['portal']; $target = $_POST['portal'];
header( "refresh:0;url=$target" ); header( "refresh:0;url=$target" );