fixed issue with lynx and portal

main
fuzzykitten 2025-02-15 13:34:53 -05:00
parent afe3841237
commit e7474dda98
2 changed files with 33 additions and 5 deletions

View File

@ -1,7 +1,7 @@
<?php
/*
* This is the endboard software, version beta 0.70
* This is the endboard software, version beta 0.71
* It is a forced anonymous textboard without timestamps, written for the
* use in the darknets.
*
@ -70,7 +70,7 @@
//++++++++++ First code block to include the config file. ++++++++++++//
// This is at the top for your convenience (if you need to edit).
// the rest of the control flow is at the bottom (line 3679 to eof).
// the rest of the control flow is at the bottom (line 3746 to eof).
$config_file = '/etc/opt/endboard/config.php';
@ -895,8 +895,22 @@ function check_portal($db, $settings, $ip)
log_event($db, $settings, "portal", $portal_message, $ip);
return;
} else {
$request = $_SERVER['REQUEST_URI'];
$characters = 'abcdefghijklmnopqrstuvwxyz'
. 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
$random_string = '';
for ($i = 0; $i < 20; $i++) {
// token length is set to 20 characters
$index = random_int(0, 51);
// we have 62 to choose, so 0 to 61
$random_string .= $characters[$index];
}
// $request = $_SERVER['REQUEST_URI'] . '/' . $random_string;
$request = '/' . $random_string;
// $request = $_SERVER['REQUEST_URI'];
header( 'HTTP/1.1 202 Accepted' );
header( 'Cache-Control: no-store', FALSE );
@ -2672,6 +2686,8 @@ function set_css_file($css)
// 1 is Skull
$css_file = '/css/style10.css';
}
// $css_file = '/css/combistyle.css';
return $css_file;

View File

@ -498,7 +498,19 @@ function check_portal($db, $settings, $ip)
log_event($db, $settings, "portal", $portal_message, $ip);
return;
} else {
$request = $_SERVER['REQUEST_URI'];
$characters = 'abcdefghijklmnopqrstuvwxyz'
. 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
$random_string = '';
for ($i = 0; $i < 20; $i++) {
// token length is set to 250 characters
$index = random_int(0, 51);
// we have 62 to choose, so 0 to 61
$random_string .= $characters[$index];
}
$request = $_SERVER['REQUEST_URI'] . '/' . $random_string;
// $request = $_SERVER['REQUEST_URI'];
// header( 'HTTP/1.1 202 Accepted' );
// header( 'Cache-Control: no-store', FALSE );