Browse Source

Move PHP session into captcha code to prevent unnecessary cookies.

main
discomrade 2 years ago
parent
commit
175022f519
  1. 7
      post.php

7
post.php

@ -169,9 +169,12 @@ elseif (isset($_GET['Newsgroups'])) {
error("NNTPChan: NNTPChan support is disabled");
}
session_start();
if (!isset($_POST['captcha_cookie']) && isset($_SESSION['captcha_cookie'])) {
// Create session cookie if not already done and captchas are enabled
if ($config['captcha']['enabled'] || $config['report_captcha']) {
session_start();
if (!isset($_POST['captcha_cookie']) && isset($_SESSION['captcha_cookie'])) {
$_POST['captcha_cookie'] = $_SESSION['captcha_cookie'];
}
}
if (isset($_POST['delete'])) {

Loading…
Cancel
Save