last minute patches

main
fuzzykitten 2025-03-07 14:57:28 -05:00
parent fa9a1cadff
commit 18bf5ce0e6
3 changed files with 20 additions and 14 deletions

View File

@ -42,8 +42,8 @@ $settings = array(
"import_file" => 'board.json', // the basename of the file to import messages from if needed "import_file" => 'board.json', // the basename of the file to import messages from if needed
"work_dir" => '/var/opt/endboard/', // the directory where the two files above are kept. Also where you will find the admin token to set the password. "work_dir" => '/var/opt/endboard/', // the directory where the two files above are kept. Also where you will find the admin token to set the password.
// this dir should be owned by the webserver (usually www-data), and it should not be in the webroot. // this dir should be owned by the webserver (usually www-data), and it should not be in the webroot.
"max_post_global" => 100000 // Maximum posts that the board will take in the defined timeframe. Set to 0 to disable. "max_post_global" => 1000, // Maximum posts that the board will take in the defined timeframe. Set to 0 to disable.
"max_post_ip" => 400000 // Maximum posts per ip that the board will take in the defined timeframe. Set to 0 to disable. "max_post_ip" => 400, // Maximum posts per ip that the board will take in the defined timeframe. Set to 0 to disable.
// If you run your service on tor only, you can set it to zero as well, and only use global. // If you run your service on tor only, you can set it to zero as well, and only use global.
"max_post_bot" => 20000, // Maximum posts for bots that the board will take in the defined timeframe. Set to 0 to disable. "max_post_bot" => 20000, // Maximum posts for bots that the board will take in the defined timeframe. Set to 0 to disable.
"max_post_timeframe" => 100, // The time in minutes that is checked to determine max posts "max_post_timeframe" => 100, // The time in minutes that is checked to determine max posts

View File

@ -593,17 +593,21 @@ function print_footer($left_section, $mid_section, $right_section)
function print_header($css_file) function print_header($css_file)
{ {
header( 'Content-Type: text/html; charset=utf-8'); // header( 'Content-Type: text/html; charset=utf-8');
header( 'X-Frame-Options: DENY', FALSE); // header( 'X-Frame-Options: DENY', FALSE);
header( 'HTTP Cross-Origin-Opener-Policy: same-origin', FALSE); // header( 'HTTP Cross-Origin-Opener-Policy: same-origin', FALSE);
header( 'Cross-Origin-Resource-Policy: same-site', FALSE); // header( 'Cross-Origin-Resource-Policy: same-site', FALSE);
header( 'Permissions-Policy: geolocation=(), camera=(), microphone=()', // header( 'Permissions-Policy: geolocation=(), camera=(), microphone=()',
FALSE); // FALSE);
header( 'Permissions-Policy: interest-cohort=()', FALSE); // header( 'Permissions-Policy: interest-cohort=()', FALSE);
header( 'Server: webserver', FALSE); // header( 'Server: webserver', FALSE);
header( 'X-DNS-Prefetch-Control: off', FALSE); // header( 'X-DNS-Prefetch-Control: off', FALSE);
header( 'Cache-Control: no-cache', FALSE); // header( 'Cache-Control: no-cache', FALSE);
header( 'Pragma: no-cache', FALSE); // header( 'Pragma: no-cache', FALSE);
// nginx throws an error with those, and gives back 502 - bad gateway
// does not happen with other versions, and also not in the desktop
// version of the page - rather strange
if ($css_file == 'no_file') { if ($css_file == 'no_file') {
$html_string = '<!DOCTYPE html><html lang=\"en\"><head></head><body>'; $html_string = '<!DOCTYPE html><html lang=\"en\"><head></head><body>';

View File

@ -455,6 +455,8 @@ function check_org_id_exists($db, $sub, $org_id)
// up to six parameters, which are concantenated and hashed. // up to six parameters, which are concantenated and hashed.
function check_portal($db, $settings, $ip) function check_portal($db, $settings, $ip)
{ {
return;
if ( ($settings['enable_portal'] != TRUE) ) { if ( ($settings['enable_portal'] != TRUE) ) {
return; return;
@ -2321,7 +2323,7 @@ switch($mode) {
. '<div class="posts" id="posts">'; . '<div class="posts" id="posts">';
echo $html_string; echo $html_string;
show_subs_count($db, $settings); show_subs_count($db, $settings);
show_set_feeds_form($db, $settings); // show_set_feeds_form($db, $settings);
echo '</div></div></body></html>'; echo '</div></div></body></html>';
quit($db, ""); quit($db, "");