diff options
Diffstat (limited to 'includes')
-rw-r--r-- | includes/config.inc | 51 | ||||
-rw-r--r-- | includes/watchdog.inc | 3 |
2 files changed, 31 insertions, 23 deletions
diff --git a/includes/config.inc b/includes/config.inc index 00b5c0e18..030d3b9d7 100644 --- a/includes/config.inc +++ b/includes/config.inc @@ -27,21 +27,17 @@ $db_name = "dries"; # $site_name = "drop.org"; $site_url = "http://www.drop.org/"; -$site_email = "droppies@drop.org"; +$site_email = "info@drop.org"; -# -# Notify information: -# The notify information will be used to send out automated mails -# for internal purpose. -# -$notify_email = $contact_email; -$notify_subject = "submission: "; -$notify_message = "New submission: '$subject'\n\n$story"; -$notify_from = "droppies@drop.org"; # -# Comment meta reasons: +# Comment votes: +# the keys of this associative array are displayed in each +# comment's selection box whereas the corresponding values +# represent the mathematical calculation to be performed +# to update a comment's value. # + $comment_votes = array("none" => "none", "-1" => "- 1", "0" => "+ 0", @@ -73,13 +69,13 @@ $categories = array("Announcements", $allowed_html = "<A><B><BR><DD><DL><DT><EM><HR><I><IL><SMALL><OL><U><UL>"; # -# Name of the 'anonymous' user account: +# Name for anonymous users: # $anonymous = "Anonymous Chicken"; # # Themes: -# the first theme listed in the associative array `$themes' will +# the first theme listed in this associative array will # automatically become the default theme. # $themes = array("Marvin" => array( @@ -94,11 +90,14 @@ $themes = array("Marvin" => array( # # Submission moderation votes: -# changing $submission_votes will affect the integrity of your -# database. In short, the database field user.history will -# become invalid, and will need to be reset! Please, do not -# change this setting unless you have an empty database or -# unless you know what you are doing. +# the keys of this associative array are displayed in each +# submission's selection box whereas the corresponding values +# represent the mathematical calculation to be performed to +# update a comment's value. +# Warning: changing $submission_votes will affect the integrity +# of all pending stories in the open submission queue. Do not +# change this setting unless there are no pending stories in the +# submission queue or unless you know what you are doing. $submission_votes = array("neutral (+0)" => "+ 0", "post it (+1)" => "+ 1", "dump it (-1)" => "- 1"); @@ -115,20 +114,28 @@ $submission_dump_threshold = "-2"; # # Submission rate: +# defines the submission rate for the different types of content +# submission. It is supposed to stop malicious attempts to screw +# with the database and to stop denial of service attacks. +# Example: +# '"comment" => 60' means that there is only one new comment +# allowed from the same IP-address every 60 seconds. # $submission_rate = array("comment" => "60", // 60 seconds = 1 minute "diary" => "300", // 300 seconds = 5 minutes "story" => "300"); // 300 seconds = 5 minutes # # Submission size: -# the maximum length in characters a submission (story, diary, -# comment) is allowed to be. +# the maximum length (i.e. the maximum number of characters) a +# story, a diary entry, or a comment is allowed to be. # -$submission_size = 6000; +$submission_size = 6000; // 6.000 characters is more or less 150 lines # # Watchdog history: +# how long we should store the log files generated by the +# watchdog # -$watchdog_history = 604800; // 604800 seconds = 1 week +$watchdog_history = 604800; // 604.800 seconds = 1 week ?> diff --git a/includes/watchdog.inc b/includes/watchdog.inc index 78e481fd9..0bc33dfbf 100644 --- a/includes/watchdog.inc +++ b/includes/watchdog.inc @@ -14,7 +14,8 @@ function watchdog($id, $message) { if ($log = db_fetch_object(db_query("SELECT * FROM watchdog WHERE hostname = '". getenv("REMOTE_ADDR") ."' AND level = '". $watchdog[$id][0] ."'"))) { if (time() - $log->timestamp < $watchdog[$id][1]) { watchdog("warning", "'". getenv("REMOTE_ADDR") ."' exceeded '$id' submission rate"); - // header("Location: error.php"); + header("Location: error.php?op=flood"); + exit(); } } } |