19 Commits

Author SHA1 Message Date
507a9a806f Renamed reserve queue to pool 2026-05-25 20:42:42 +02:00
22bf6c13ca Added more logging, and info on show length to stats 2026-05-25 13:27:45 +02:00
6f7b8a60ff 2026-05-04_15-52-03Z_Monday #105 redirect old to new ccdn 2026-05-04 17:52:03 +02:00
1612659b44 2026-05-03_14-37-33Z_Sunday #104 shownotes must be provided 2026-05-03 16:37:33 +02:00
e59d26d0ea 2026-04-05_14-37-09Z_Sunday fix for status change on reclicking link 2026-04-05 16:37:09 +02:00
c92a73ff4e removes formatting from the uploaded html 2026-02-24 17:46:26 +01:00
59a4ea3d81 Pushed a wip file 2026-01-30 10:44:49 +01:00
4152de87f0 Clarified the error message 2026-01-30 10:43:01 +01:00
c9e75950b0 The status is not changing so we need more reporting 2026-01-09 17:30:46 +01:00
e8c7924762 P1: QuillJs says button instead of the menu option using NVDA Screen reader #75 2025-12-24 15:03:45 +01:00
f096a02bfc Add content-disposition to fix HPR/hpr_generator#321 2025-12-23 16:40:29 +01:00
76a137d94f Typos and clarifications to the comments 2025-12-02 18:24:53 +01:00
3c5a9f6a4f Better explanations I101 2025-11-25 19:33:15 +01:00
e8d9af1f61 Added notes to each error. 2025-11-17 16:39:26 +01:00
849536f694 Merge pull request 'Update CSS with dark theme from hpr_generator' (#100) from i275_User-desiresa-Dark-Theme into main
Reviewed-on: #100
2025-10-25 18:11:14 +00:00
df7fd5a3c2 Update CSS with dark theme from hpr_generator 2025-10-25 13:59:31 -04:00
0378282264 Al is valid and smaller than 3 2025-10-22 07:10:51 +02:00
ebae3bc284 Add new website design header images to repo 2025-10-21 22:29:04 -04:00
cfe29eb0e2 Merge pull request 'Update hub layout to match the new HPR website' (#99) from newsite into main
Reviewed-on: #99
2025-10-18 03:33:13 +00:00
16 changed files with 507 additions and 188 deletions

View File

@@ -116,10 +116,10 @@ else {
$provided_notes = urldecode( $decoded_json["notes"] );
if ( empty($provided_notes) or strlen($provided_notes) > 100000 ) {
problem("Notes are missing not less than max");
if ( empty($provided_notes) ) {
problem("Notes are missing ");
}
logextra( "Notes are present and are under the max length" );
logextra( "Notes are present " );
$notes = $provided_notes;
@@ -255,7 +255,7 @@ logextra( "Host ID was found \"$host_id\"" );
$provided_host_name = urldecode( $decoded_json["host_name"] );
if ( empty( $provided_host_name ) or strlen( $provided_host_name ) < 3 or strlen( $provided_host_name ) > 50 ) {
if ( empty( $provided_host_name ) or strlen( $provided_host_name ) < 2 or strlen( $provided_host_name ) > 50 ) {
problem("host_name length is not correct");
}
@@ -531,9 +531,7 @@ if ( strcmp( $host_license, $db_license ) !== 0 ) {
logextra( "Updating the host license" );
}
}
else {
logextra( "The host_license is the same to that in the db \"$host_license\"" );
}
logextra( "The host_license is the same to that in the db \"$host_license\"" );
$title = mysqli_real_escape_string( $connection, $title );
$summary = mysqli_real_escape_string( $connection, $summary );
@@ -541,10 +539,15 @@ $notes = mysqli_real_escape_string( $connection, $notes );
$tags = mysqli_real_escape_string( $connection, $tags );
$query_add = "INSERT INTO eps VALUES ('$ep_num', '{$ep_date}', '{$title}', '{$duration}', '{$summary}', '{$notes}', '{$host_id}', '{$series_id}', '{$explicit}', '{$episode_license}', '{$tags}', '0', '0', '0')";
logextra( "About to add to db" );
$result = mysqli_query($connection, $query_add );
if(!$result) {
problem("DB problem - The show $ep_num was not added to the eps db.");
}
logextra( "Response from db \"$result\"" );
if (mysqli_errno( $connection )) {
$error = "MySQL error ".mysqli_errno( $connection ).": ".mysqli_error()."\n";
problem("MySQL error- The show $ep_num was not added to the eps db.\n$error");

View File

@@ -29,7 +29,7 @@ if ($result = mysqli_query($connection, $ep_retrieve)) {
}
// --------------------------------------------
// Shows in the Reserve Queue
// Shows in the reserve pool
$ep_retrieve = "SELECT COUNT(*) as num_reserve_shows FROM reservations WHERE status='RESERVE_SHOW_SUBMITTED'";
if ($result = mysqli_query($connection, $ep_retrieve)) {
@@ -51,6 +51,35 @@ if ($result = mysqli_query($connection, $ep_retrieve)) {
$next_free_slot = "https://repo.anhonesthost.net/HPR/hpr_hub/issues/71";
// --------------------------------------------
// Get the Shortest Show
$ep_retrieve = "SELECT id, duration FROM eps WHERE duration = ( SELECT MIN(duration) FROM eps WHERE duration > 0 AND id != 903)";
if ($result = mysqli_query($connection, $ep_retrieve)) {
$data=mysqli_fetch_assoc($result);
$min_duration_seconds = intval( $data['duration'] );
$min_duration_episode_number = intval( $data['id'] );
}
// --------------------------------------------
// Get the Longest Show
$ep_retrieve = "SELECT id, duration FROM eps WHERE duration = ( SELECT MAX(duration) FROM eps WHERE duration > 0 AND id != 903)";
if ($result = mysqli_query($connection, $ep_retrieve)) {
$data=mysqli_fetch_assoc($result);
$max_duration_seconds = intval( $data['duration'] );
$max_duration_episode_number = intval( $data['id'] );
}
// --------------------------------------------
// Get the Average Show
$ep_retrieve = "SELECT AVG(duration) as avg_duration FROM `eps` WHERE duration > 0";
if ($result = mysqli_query($connection, $ep_retrieve)) {
$data=mysqli_fetch_assoc($result);
$avg_duration_seconds = intval( $data['avg_duration'] );
}
// --------------------------------------------
// playtime
$ep_retrieve = "SELECT SUM(duration) as total_playtime_all_hpr_shows_seconds FROM `eps`";
@@ -74,7 +103,10 @@ $total_released_shows = $latest_episode_id + $total_twt_shows;
$total_submitted_shows = $latest_episode_id + $total_twt_shows + $num_future_shows + $num_reserve_shows;
$project_age_seconds = strtotime( $start_date_twt ) - $current_time;
$project_age = convertSecToTime( $project_age_seconds );
$project_age = convertSecToTime( $project_age_seconds );
$min_duration = convertSecToTime( $min_duration_seconds );
$max_duration = convertSecToTime( $max_duration_seconds );
$avg_duration = convertSecToTime( $avg_duration_seconds );
// --------------------------------------------
@@ -90,7 +122,7 @@ if ($result = mysqli_query($connection, $ep_retrieve)) {
}
// --------------------------------------------
// Shows in the Reserve Queue
// Shows in the reserve pool
$ep_retrieve = "SELECT COUNT(*) AS num_unprocessed_shows FROM reservations WHERE status!='RESERVE_SHOW_SUBMITTED' AND status!='REQUEST_UNVERIFIED'";
if ($result = mysqli_query($connection, $ep_retrieve)) {
@@ -114,6 +146,14 @@ $arr = array(
'num_reserve_shows' => $num_reserve_shows,
'total_submitted_shows' => $total_submitted_shows,
'num_hosts' => $num_hosts,
'shortest_show_number' => $min_duration_episode_number,
'shortest_show_duration' => $min_duration,
'shortest_show_seconds' => $min_duration_seconds,
'longest_show_number' => $max_duration_episode_number,
'longest_show_duration' => $max_duration,
'longest_show_seconds' => $max_duration_seconds,
'average_show_length' => $avg_duration,
'average_show_length_seconds' => $avg_duration_seconds,
'days_to_next_free_slot' => "todo",
'total_playtime_all_shows_seconds' => $total_playtime_all_shows_seconds,
'total_playtime_all_shows_human_readable' => $total_playtime_all_shows_human_readable,

View File

@@ -2,8 +2,9 @@
require "/home/hpr/php/include.php";
if ( $_SERVER['REQUEST_METHOD'] !== 'GET' ) {
naughty("438a220a58dc34c200a8669547afc66b");
naughty("438a220a58dc34c200a8669547afc66b REQUEST_METHOD not supported");
}
logextra( "GET Method used." );
$num_get_args=0;
foreach($_GET as $k => $v) {
@@ -12,9 +13,8 @@ foreach($_GET as $k => $v) {
if ( $num_get_args !== 2 ){
$result = mysqli_query($connection, "SET time_zone = '+0:00';");
if (!isset($result)) {
naughty("cca6408ae1febc3f07974177b2d04375");
naughty("cca6408ae1febc3f07974177b2d04375 DB Error");
}
header("Content-type: text/csv");
print "timestamp_epoc,ep_num,ep_date,key,status,email\n";
# 1649790226_3710_2022-10-21_b291590ce4ba23b519935bde53d0a5936255cd12e96b4
@@ -26,36 +26,40 @@ if ( $num_get_args !== 2 ){
}
}
else {
naughty("2dcabda45255713ea9bf04523e804016");
naughty("2dcabda45255713ea9bf04523e804016 Query error");
}
logextra( "Got status from DB" );
mysqli_close($connection);
exit;
}
if ( empty($_GET["ep_num"]) or empty($_GET["status"]) ) {
naughty("32bedea129648f27701f2f2f3ff4b7b5");
naughty("32bedea129648f27701f2f2f3ff4b7b5 Empty ep_num or status");
}
logextra( "Got non Empty ep_num or status" );
if ( !in_array($_GET["status"], array('METADATA_PROCESSED','SHOW_POSTED','MEDIA_TRANSCODED','UPLOADED_TO_IA','UPLOADED_TO_RSYNC_NET','REMOVE_RESERVATION'), true ) ) {
naughty("88882bc97094e7aabf2a258756f917f5 ");
naughty("88882bc97094e7aabf2a258756f917f5 Wrong enum status");
}
else {
$status = $_GET["status"];
}
logextra( "Got valid enum status" );
if ( !empty($_GET["ep_num"]) and isset( $_GET["ep_num"] ) ) {
$ep_num = intval( $_GET["ep_num"] );
}
else {
naughty("ecb0ebc5b38b4c09226ccbfce05978cb");
naughty("ecb0ebc5b38b4c09226ccbfce05978cb ep_num not correct");
}
logextra( "Got valid ep_num" );
// // SELECT MAX(ep_num) FROM `reservations` → 3627
// // SELECT MIN(ep_num) FROM `reservations` WHERE ep_num > 0 → 3582
//
$result = mysqli_query($connection, 'SELECT MAX(ep_num) FROM `reservations`;');
if (!isset($result)) {
naughty("360e6381ffca736b6f12056abd7dcc7d");
naughty("360e6381ffca736b6f12056abd7dcc7d Cant get max from db");
}
$max_eps_array = mysqli_fetch_row( $result );
$max_eps = $max_eps_array[0];
@@ -63,23 +67,27 @@ mysqli_free_result($result);
$result = mysqli_query($connection, 'SELECT MIN(ep_num) FROM `reservations` WHERE ep_num > 0;');
if (!isset($result)) {
naughty("6971b6d378292e8fc9583de6082eddf4");
naughty("6971b6d378292e8fc9583de6082eddf4 Cant get min from db");
}
$min_eps_array = mysqli_fetch_row( $result );
$min_eps = $min_eps_array[0];
mysqli_free_result($result);
logextra( "Got smallest ep_num from db" );
if ( empty( $ep_num ) ) {
naughty("6cf46a9b21e667c61b2c5bf87a7104f9 $ep_num");
naughty("6cf46a9b21e667c61b2c5bf87a7104f9 Empty ep_num");
}
logextra( "ep_num is not empty" );
if ( $ep_num < $min_eps ) {
naughty("bbcef7cd8a263dc57e85195935ad600a $ep_num < $min_eps");
naughty("bbcef7cd8a263dc57e85195935ad600a Invalid $ep_num < $min_eps");
}
logextra( "ep_num is not less than the minimum ep" );
if ( $ep_num > $max_eps ) {
naughty("a75115f3fa706ceee4b61971cd22b8f9 $ep_num > $max_eps");
naughty("a75115f3fa706ceee4b61971cd22b8f9 Invalid $ep_num > $max_eps");
}
logextra( "ep_num is not greater than max ep" );
// SHOW_SUBMITTED → METADATA_PROCESSED → SHOW_POSTED → MEDIA_TRANSCODED → UPLOADED_TO_IA → UPLOADED_TO_RSYNC_NET
switch ($status) {
@@ -105,28 +113,35 @@ switch ($status) {
$error = "MySQL error ".mysqli_errno( $connection).": ".mysqli_error($connection)."\n";
problem("Could not update the show reservation to $status in the db");
}
logextra( "Was able to remove the reservation for $ep_num" );
mysqli_free_result($result);
mysqli_close($connection);
logextra( "$query");
die;
}
logextra( "Set current status to $current_status" );
$result = mysqli_query($connection, "SELECT ep_num FROM reservations WHERE `ep_num` = '$ep_num' AND status='$current_status';");
if (!isset($result)) {
naughty("7f2d7228ca355be6dd2a24769595b18f");
naughty("7f2d7228ca355be6dd2a24769595b18f Cant get reservation");
}
logextra( "Retrieved the reservation for $ep_num with status of $current_status" );
$db_ep_num_array = mysqli_fetch_row( $result );
$db_ep_num = $db_ep_num_array[0];
mysqli_free_result($result);
if ( $db_ep_num != $ep_num ){
problem("da59731c6ae6d1ce0fa2fa9fc4e1e726 $db_ep_num != $ep_num");
problem("da59731c6ae6d1ce0fa2fa9fc4e1e726 Error $db_ep_num != $ep_num");
}
logextra( "The ep_num matches the db" );
$query = "UPDATE reservations SET `status` = '$status' WHERE `ep_num` = '$ep_num' AND status='$current_status';";
$result = mysqli_query($connection, $query );
if(!isset($result)) {
problem("8a76bb408877b1d33bf31ea96b6fc02f");
problem("8a76bb408877b1d33bf31ea96b6fc02f Could not UPDATE Reservation");
}
logextra( "Was able to update the status of $ep_num from $current_status to $status" );
if (mysqli_errno( $connection )) {
$error = "MySQL error ".mysqli_errno( $connection).": ".mysqli_error($connection)."\n";
problem("Could not update the show reservation to $status in the db");

View File

@@ -17,23 +17,64 @@ include 'header.php';
$ip = $_SERVER["REMOTE_ADDR"];
# Remove any stale requests.
# Remove any stale REQUEST_UNVERIFIED requests.
# This should be enough to deter attackers while been short enough to allow real hosts to request a show.
$query_delete_old = "DELETE
$query_delete_old_REQUEST_UNVERIFIED = "DELETE
FROM
reservations
WHERE
reservations.timestamp + INTERVAL 1 HOUR <= UTC_TIMESTAMP()
AND reservations.status = 'REQUEST_UNVERIFIED'";
$result_delete_old = @mysqli_query($connection, $query_delete_old);
logextra( "Deleting requests older than 1 hour" . $result_delete_old );
$result_delete_old_REQUEST_UNVERIFIED = @mysqli_query($connection, $query_delete_old_REQUEST_UNVERIFIED);
if(!$result_delete_old_REQUEST_UNVERIFIED) {
problem("ERROR: DB problem - The old REQUEST_UNVERIFIED records were not removed from the reservations db.");
}
else{
logextra( "mysql_query.result: \"$result\"\n" );
}
logextra( "Removed REQUEST_UNVERIFIED requests older than 1 hour " . $result_delete_old_REQUEST_UNVERIFIED );
# Remove any stale REQUEST_EMAIL_SENT requests.
# This should be enough for someone to acutally upload a show
$query_delete_old_REQUEST_EMAIL_SENT = "DELETE
FROM
reservations
WHERE
reservations.timestamp + INTERVAL 3 HOUR <= UTC_TIMESTAMP()
AND reservations.status = 'REQUEST_EMAIL_SENT'";
$result_delete_old_REQUEST_EMAIL_SENT = @mysqli_query($connection, $query_delete_old_REQUEST_EMAIL_SENT);
if(!$result_delete_old_REQUEST_EMAIL_SENT) {
problem("ERROR: DB problem - The old REQUEST_EMAIL_SENT records were not removed from the reservations db.");
}
else{
logextra( "mysql_query.result: \"$result\"\n" );
}
logextra( "Removed REQUEST_EMAIL_SENT requests older than 3 hours " . $result_delete_old_REQUEST_EMAIL_SENT );
# Remove stale requests from this IP Address after 15 minutes.
# This should be enough to deter attackers while been short enough to allow real hosts to request a show.
$query_delete = "DELETE FROM reservations WHERE reservations.ip = '$ip' AND reservations.timestamp + INTERVAL 15 MINUTE <= UTC_TIMESTAMP() AND reservations.status = 'REQUEST_UNVERIFIED'";
$query_delete = "DELETE
FROM
reservations
WHERE
reservations.ip = '$ip'
AND
reservations.timestamp + INTERVAL 15 MINUTE <= UTC_TIMESTAMP()
AND
reservations.status = 'REQUEST_UNVERIFIED'";
$result_delete = @mysqli_query($connection, $query_delete);
logextra( "Remove stale requests from this \"${ip}\" IP Address after 15 minutes. " . $result_delete_old );
if(!$result_delete) {
problem("ERROR: DB problem - The old REQUEST_UNVERIFIED records were not removed from this \"${ip}\" IP Address after 15 minutes.");
}
else{
logextra( "mysql_query.result: \"$result\"\n" );
}
logextra( "Remove REQUEST_UNVERIFIED stale requests from this \"${ip}\" IP Address after 15 minutes. " . $result_delete );
// --------------------------------------------
// Get first free slot
@@ -74,7 +115,7 @@ $max_episode_number = $max_episode_array[0];
print "<!-- max_episode_number is $max_episode_number -->\n";
// --------------------------------------------
// Get the number of shows in the reserve queue.
// Get the number of shows in the reserve pool.
$query = mysqli_query($connection, "SELECT COUNT(*) as count_reserve_queue FROM reservations WHERE status = 'RESERVE_SHOW_SUBMITTED' AND ip = '127.0.0.1';");
$response_array = mysqli_fetch_row($query);
@@ -82,7 +123,7 @@ $count_reserve_queue = $response_array[0];
print "<!-- count_reserve_queue is $count_reserve_queue -->\n";
// --------------------------------------------
// Get the number of shows in the reserve queue yet to be processed.
// Get the number of shows in the reserve pool yet to be processed.
$query = mysqli_query($connection, "SELECT COUNT(*) as count_reserve_queue_unprocessed FROM reservations WHERE status = 'RESERVE_SHOW_SUBMITTED' AND ip != '127.0.0.1';");
$response_array = mysqli_fetch_row($query);
@@ -260,7 +301,7 @@ There are only <strong><?php echo "${days_to_wait}"; ?></strong> days to wait un
</p>
<ol>
<li>Review the updated <em><a aria-label="Learn the Stuff you need to know" href="<?php echo "${referrerurl}about.html#agreement"; ?>">Stuff you need to know</a></em> page.</li>
<li>Select a date, or post to the reserve queue.</li>
<li>Select a date, or post to the reserve pool.</li>
<li>Click the link in the confirmation email</li>
<li>Then <a aria-label="Help on Adding an episode" href="<?php echo "${baseurl}about.html#adding_an_episode"; ?>">fill in a form</a>.</li>
</ol>
@@ -273,13 +314,13 @@ There are only <strong><?php echo "${days_to_wait}"; ?></strong> days to wait un
<li>When the queue is filling up then leave some slots free for new contributors.</li>
<li>Post non urgent shows into the first empty week.</li>
<li>If you are uploading a series of shows then post them one every two weeks.</li>
<li>If you have a non urgent show that is timeless, then add it to the <a href="<?php echo $referrerurl ?>about.html#reserve_queue">Reserve Queue</a>.</li>
<li>If you have a non urgent show that is timeless, then add it to the <a href="<?php echo $referrerurl ?>about.html#reserve_queue">reserve pool</a>.</li>
</ol>
<h2 id="reserve_queue">Add to the Reserve Queue ?</h2>
<h2 id="reserve_queue">Add to the reserve pool ?</h2>
<p>
<a aria-label="Post to the reserve queue" href="<?php echo "${hubBaseurl}"; ?>request.php?id=9999">Post your show to the <strong>reserve queue</strong></a> if you don't care when it will be released. <small><a aria-label="Help on the reserve queue" href="<?php echo "${referrerurl}"; ?>about.html#reserve_queue";">&#9432;</a></small>
<a aria-label="Post to the reserve pool" href="<?php echo "${hubBaseurl}"; ?>request.php?id=9999">Post your show to the <strong>reserve pool</strong></a> if you don't care when it will be released. <small><a aria-label="Help on the reserve pool" href="<?php echo "${referrerurl}"; ?>about.html#reserve_queue";">&#9432;</a></small>
</p>
<h2 id="current_schedule">Select a date in the current schedule ?</h2>
@@ -343,7 +384,7 @@ while ( $slot <= $max_episode_number) {
}
?>
<h3 id="reserve_queue_overview">Reserve Queue Overview</h3>
<h3 id="reserve_queue_overview">reserve pool Overview</h3>
<pre>
<?php
include 'reserve.txt';

View File

@@ -101,6 +101,10 @@ if ($pos !== false) {
logextra( "Sending request to ${path}" );
// header("Content-Type: application/jpeg");
// header("Content-Length: " . filesize($original_filename));
// https://hub.hackerpublicradio.org/ccdn.php?filename=/eps/hpr4537/hpr4537.mp3
header('Content-Disposition: attachment; filename="' .$name . '"');
header("location:${path}");
?>

View File

@@ -10,53 +10,53 @@ foreach($_GET as $k => $v) {
if ( $num_get_args > 0 ){
# they didn't supply any arguments
naughty("9e756ee22b7cdcdb150a5baf167caa25 $num_get_args");
naughty("9e756ee22b7cdcdb150a5baf167caa25 No arguments provided $num_get_args");
}
if ( empty($_POST["anti_spam_question"]) ) {
naughty("0601a23e358374c293b086bb75606cca");
naughty("0601a23e358374c293b086bb75606cca You failed the anti spam question");
}
if ( strlen($_POST["anti_spam_question"]) !== 6 ) {
naughty("6f51e6e7e6820b3fdda5d4ca0df14db1");
naughty("6f51e6e7e6820b3fdda5d4ca0df14db1 You have the wrong spam answer");
}
if (strcasecmp('public', $_POST["anti_spam_question"]) !== 0) {
naughty("6aef421ce05e3ac34f4cd91ae3248a45");
naughty("6aef421ce05e3ac34f4cd91ae3248a45 You don't know what P is in HPR");
}
if ( ! file_exists( $comment_directory ) ) {
# Looks like the comments directory has not been created
naughty("d5342ea497f701656433e81fb5eed064");
naughty("d5342ea497f701656433e81fb5eed064 Comment file could not be created");
}
$unprocessed_comments = iterator_count(new FilesystemIterator("$comment_directory", FilesystemIterator::SKIP_DOTS));
if( $unprocessed_comments >= 10 ) {
# There has to be at least one comment here as they are calling the script, and too many is suspicious
naughty("093f42abee30e69e0e4d5125c70a0f7c");
naughty("093f42abee30e69e0e4d5125c70a0f7c Too many unprocessed comments - shutting myself down");
}
# This is to prevent anything except hits from the web form.
# Anyone wanting to script uploads can do so via ftp
if ( $_SERVER['REQUEST_METHOD'] !== 'POST' ) {
naughty("87613fc139b251b673e1dd51e378e462");
naughty("87613fc139b251b673e1dd51e378e462 Must be a POST");
}
if ( empty($_SERVER["REMOTE_ADDR"]) ) {
naughty("d7d0b6ab9689be244e1b6a8fbe6effba");
naughty("d7d0b6ab9689be244e1b6a8fbe6effba Missing remote address");
}
else {
$ip = $_SERVER["REMOTE_ADDR"];
}
if (count($_POST) !== 8) {
naughty("086fe155b0588de68fc5d9e4580254a8");
naughty("086fe155b0588de68fc5d9e4580254a8 Not correct number of fields");
}
// Basic POST Checks
if ( empty($_POST["comment_author_name"]) or strlen($_POST["comment_author_name"]) > 40 or strtolower($_POST["comment_author_name"]) == "testdog" ) {
naughty("294356cd36d3f9b75da4d8c0a6108881");
naughty("294356cd36d3f9b75da4d8c0a6108881 Your name wrong");
}
$comment_author_name = $_POST["comment_author_name"];
$comment_author_name_json = json_encode( $_POST["comment_author_name"] );
@@ -69,7 +69,7 @@ else {
}
if ( empty($_POST["comment_title"]) or strlen($_POST["comment_title"]) > 100 ) {
naughty("a89efb428cfe36996a65b371d5f4e303");
naughty("a89efb428cfe36996a65b371d5f4e303 The title is too long");
}
$comment_title = $_POST["comment_title"];
$comment_title_json = json_encode( $_POST["comment_title"] );
@@ -81,9 +81,13 @@ else {
$comment_title_ascii = "EXTENDED";
}
if ( empty($_POST["comment_text"]) or strlen($_POST["comment_text"]) > 2000 or strpos(strtolower($_POST["comment_text"]), "outlook.con") !== false ) {
naughty("cd57ab4d7b77a131ed3deb441bd93dcd");
if ( empty($_POST["comment_text"]) ) {
naughty("cd57ab4d7b77a131ed3deb441bd93dcd The comment text is missing.");
}
if ( strlen($_POST["comment_text"]) > 2000 or strpos(strtolower($_POST["comment_text"]), "outlook.con") !== false ) {
naughty("cd57ab4d7b77a131ed3deb441bd93dcd The comment text is too verbose. Record a show instead.");
}
$comment_text = $_POST["comment_text"];
$comment_text_json = json_encode( $_POST["comment_text"] );
@@ -95,7 +99,7 @@ else {
}
if ( empty($_POST["spammer"]) or strcmp($_POST["spammer"], "No") !== 0 ) {
naughty("b2ec68bd04cee0f64143ce4827a97e7c");
naughty("b2ec68bd04cee0f64143ce4827a97e7c You selected that you were a spammer");
}
# We check to see if the eps_id has been suplied, that it's a integer, and that it's in our range.
@@ -108,13 +112,13 @@ if (isset($_POST['eps_id'])){
$row = mysqli_fetch_array($result, MYSQLI_NUM);
$total = $row[0];
if ( !isset($result) or ( $total != 1 ) ) {
naughty("5348e3c2aee3644730c70d3f000bcb01");
naughty("5348e3c2aee3644730c70d3f000bcb01 No response from the db");
}
mysqli_free_result($result);
$result = mysqli_query($connection, 'SELECT MAX(id) as max FROM eps;');
if (!isset($result)) {
naughty("f00fb1f47affc3286aadc15038cfd5d7");
naughty("f00fb1f47affc3286aadc15038cfd5d7 Could not find the max id");
}
while ($row = mysqli_fetch_array($result)) {
$max_eps = $row['max'];
@@ -122,19 +126,19 @@ if (isset($_POST['eps_id'])){
mysqli_free_result($result);
}
else {
naughty("02c560adf1ff39b140fe8b7abe02fd31");
naughty("02c560adf1ff39b140fe8b7abe02fd31 Commenting on a non existant show is odd");
}
if ( intval($eps_id) <= 0 ){
naughty("2903eeac51bb479edb428ae3c896671c");
naughty("2903eeac51bb479edb428ae3c896671c Commenting on a non show with ID less than zero is odd");
}
if ( intval($eps_id) > $max_eps ){
naughty("54aa65c12ba71f3dfc451ff5bc82c798");
naughty("54aa65c12ba71f3dfc451ff5bc82c798 Commenting on a show that is more than our posted episodes is odd");
}
if ( intval($eps_id) === 0 ) {
naughty("11fe1f9b76bf9f30e6a3a784832cb738");
naughty("11fe1f9b76bf9f30e6a3a784832cb738 Commenting on a show zero is odd");
}
else {
$eps_id = intval($eps_id);
@@ -155,16 +159,16 @@ if ($result = mysqli_query($connection, $query)) {
}
}
else {
naughty("c34561d684ad97241c95a1287688638b");
naughty("c34561d684ad97241c95a1287688638b Could not get the hosts from the db");
}
mysqli_free_result($result);
if ( empty($_POST["hostid"]) or intval($_POST["hostid"]) != $host_id ) {
naughty("b4d71481b7055272728094292fd2a562");
naughty("b4d71481b7055272728094292fd2a562 Cant find that host id. You picked the wrong host from the list");
}
if ( empty($_POST["justification"]) or strlen($_POST["justification"]) > 200 or strlen($_POST["justification"]) < 20) {
naughty("156d2d2d5780bd7f4a750f7c162b3394");
naughty("156d2d2d5780bd7f4a750f7c162b3394 You need to have a sufficiently long answer to 'What does HPR mean to you?'.");
}
# Checks to see how old the show is
@@ -173,7 +177,7 @@ list ($current_episode_date, $current_episode_number) = GetLatestPublishedShow($
if ( ( $eps_id <= $current_episode_number ) and ( $eps_id >= ( $current_episode_number - 20 ) ) ) {
if ( strcmp($_POST["justification"], "No justification is asked for or required.") !== 0 ) {
naughty("9357d78bf73b03ee2dd902a4c975f91d");
naughty("9357d78bf73b03ee2dd902a4c975f91d You're saying No justification on a show that requires justification");
}
else {
$justification = "Current Comment";
@@ -183,7 +187,7 @@ if ( ( $eps_id <= $current_episode_number ) and ( $eps_id >= ( $current_episode_
else {
if ( strcmp($_POST["justification"], "No justification is asked for or required.") === 0 ) {
print ">" . $_POST["justification"] ."< eps_id: $eps_id, current_episode_number: $current_episode_number, ";
naughty("df4af9bdd0302f672d6311c76bdc461a");
naughty("df4af9bdd0302f672d6311c76bdc461a A current comment should not require Justification");
}
else {
$justification = $_POST["justification"];
@@ -199,7 +203,7 @@ else {
}
if ( empty($_SERVER["REMOTE_ADDR"]) ) {
naughty("611144d4c0d575fffbf8f3ef11f8ad68");
naughty("611144d4c0d575fffbf8f3ef11f8ad68 Missing REMOTE_ADDR");
}
else {
$ip = $_SERVER["REMOTE_ADDR"];
@@ -216,7 +220,7 @@ $timestamp = $timestamp;
$timestamp_json = json_encode($timestamp);
$comment_key_json = json_encode( $key );
if ( file_exists( $comment_file ) ) {
naughty("ef5d14b33b262bfbf5d40544fdeb9ec3");
naughty("ef5d14b33b262bfbf5d40544fdeb9ec3 File already exists");
}
$comment_data = "{
@@ -233,7 +237,7 @@ $comment_data = "{
file_put_contents($comment_file, $comment_data );
if ( filesize( $comment_file ) > 4000 ) {
naughty("56e00e793a27168511d1cfda11d3bc55");
naughty("56e00e793a27168511d1cfda11d3bc55 Filesize is too big");
}
$user_agent = preg_replace('/ \(/', "\n", $_SERVER["HTTP_USER_AGENT"] );

View File

@@ -349,7 +349,7 @@ article > p,
2px 4px 4px var(--shadow-cards);
transition: 0.3s;
flex: 1 0 100%;
overflow-x: scroll;
overflow: auto;
padding-bottom: 1rem;
}
.lane > article:hover,
@@ -363,7 +363,7 @@ article > p,
margin-right: 1rem;
}
.lane > article > header,
.lane > article > h3 {
.lane > article > h3:first-child {
background: var(--background-secondary);
padding: 1.5rem 1rem 1rem 1rem;
margin: 0;
@@ -371,12 +371,25 @@ article > p,
font-size: 1.45rem;
color: var(--background-primary);
}
.lane > article > header > .index-link {
float: right;
}
.lane.stack > article {
border-radius: 0.5rem;
border: thin solid var(--background-secondary);
max-width: calc(100vw - 12px);
}
.lane.stack > article > header,
.lane.stack > article > h3:first-child {
border-top-left-radius: 0.5rem;
border-top-right-radius: 0.5rem;
}
.lane > article > header a,
.lane > article > h3 a {
.lane > article > h3:first-child a {
color: var(--link-secondary);
}
.lane > article > header a:hover,
.lane > article > h3:hover {
.lane > article > h3:first-child:hover {
color: var(--link-secondary-hover);
}
.lane.stack> * > header * {
@@ -595,8 +608,8 @@ fieldset > table td input[type="radio"] {
}
#youtube {
--video-ratio: calc(390 / 640);
width: min(calc(95vw + 0px), 640px);
height: min(calc(calc(95vw + 0px) * var(--video-ratio)), 320px);
width: min(calc(89vw + 0px), 640px);
height: min(calc(calc(89vw + 0px) * var(--video-ratio)), 390px);
}
#upload_method pre {
max-width: 80vw;
@@ -828,3 +841,39 @@ fieldset > table td input[type="radio"] {
max-width: 30%;
}
}
@media (prefers-color-scheme: dark) {
:root {
--link-primary: #bbdfe7;
--link-header-hover: #b54c08; /* original --link-primary-hover */;
--link-primary-hover: var(--link-secondary-hover);
--background-primary: #4d4d4d; /* HPR Grey */
--text-primary: #dfdfdf /*#fffff7#fafafa#fbfbee #dfdfdf */;
--banner-text-primary: #b6b6b6;
--shadow-secondary-color: hsl(0, 0%, 40%);
--input-border-primary: var(--shadow-secondary-color);
--lane-button-color: #d5e6ea;
}
body > header {
background-image: url("/images/main-header-background-dark.png");
background-color: #22545a;
}
img {
filter: brightness(0.70);
}
a.lane-button {
background-image: url("/images/lane-button-background-dark.png");
color: var(--lane-button-color);
}
a.lane-button img {
filter: none;
}
.lane > article > header {
color: var(--text-secondary);
}
#title a:hover {
color: var(--link-header-hover);
}
#hosts td:nth-child(-n+2) {
color: var(--text-primary);
}
}

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 529 KiB

3
hub/quill.2.0.3.js Normal file

File diff suppressed because one or more lines are too long

10
hub/quill.snow.2.0.3.css Normal file

File diff suppressed because one or more lines are too long

View File

@@ -112,24 +112,24 @@ if (isset($_GET['id'])){
}
if ( strval( intval( $id ) ) != strval( $id ) ) {
naughty("e015b7c89da03385a9156d3e5d2eb25d");
naughty("e015b7c89da03385a9156d3e5d2eb25d The id is not a integer");
}
if ( intval( $id ) <= 0 ) {
naughty("1493a07dec01a006d11bf43d2f17e5aa");
naughty("1493a07dec01a006d11bf43d2f17e5aa The ID is less than or equal to one");
}
if ( $num_get_args > 2 ) {
naughty("79543dbb498ec47404aaed4d56bdc22b");
naughty("79543dbb498ec47404aaed4d56bdc22b The number of arguments is greater than 2");
}
if ( intval($id) > 9999 ) {
naughty("f1f531c768f64404cb00437254b06d71");
naughty("f1f531c768f64404cb00437254b06d71 The id is too high");
}
if ( $id != 9999 ) {
if ( isset( $show_array[$id] ) ) {
naughty("2227263ac7171aca3214d155dec539ad");
naughty("2227263ac7171aca3214d155dec539ad The id \"${id}\" is already reserved");
}
}
}
@@ -168,10 +168,10 @@ include 'header.php';
echo "<select name=\"ep_num_date\">\n";
$this_episode_date = $next_show_date;
if ( $id == 9999 ) {
echo "<option value=\"9999_1970-01-01\" selected>Reserve Queue.</option>\n";
echo "<option value=\"9999_1970-01-01\" selected>Reserve Pool.</option>\n";
}
else {
echo "<option value=\"9999_1970-01-01\">Reserve Queue.</option>\n";
echo "<option value=\"9999_1970-01-01\">Reserve Pool.</option>\n";
}
for ( $slot = $next_show_num; $slot<($next_show_num+365); $slot++ ) {
if (empty($show_array[$slot])) {

View File

@@ -10,23 +10,23 @@ $total = $row[0];
if(!isset($total) or $total > 150 ) {
# This seems to indicate that we are under an attack as we never get 5 shows in the one day from different hosts.
# A host doing bulk upload will need to do them one by one
naughty("5971624889258aefb44e5f7bf8dffbd4");
naughty("5971624889258aefb44e5f7bf8dffbd4 Too many requests - shutting down");
}
# This is to prevent anything except hits from the web form.
if ( $_SERVER['REQUEST_METHOD'] !== 'POST' ) {
naughty("19e9019c9615f755aec834000892ee9e");
naughty("19e9019c9615f755aec834000892ee9e Request method is not POST");
}
if ( empty($_SERVER["REMOTE_ADDR"]) ) {
naughty("9bb147a251e8db132dafa93d98f8487f");
naughty("9bb147a251e8db132dafa93d98f8487f The REMOTE_ADDR is missing");
}
else {
$ip = $_SERVER["REMOTE_ADDR"];
}
if (count($_POST) !== 2) {
naughty("02de1aef3b9490a417c39170d8f06028");
naughty("02de1aef3b9490a417c39170d8f06028 The post contains the incorrect number of entries");
}
# This will check to see if there are any existing requests from this ip address
@@ -36,58 +36,58 @@ $db = mysqli_fetch_array($result, MYSQLI_ASSOC);
if ( empty($db["ip"]) ) {
# the request did not come via the web form
naughty("2162941738512bfdb1d21f288ee7cdb4");
naughty("2162941738512bfdb1d21f288ee7cdb4 There is no reservation available for this ip");
}
if ( strtotime($db['timestamp']) >= $_SERVER["REQUEST_TIME"] ) {
# they are playing with the database or time settings
naughty("f0ad965f523b5c2ade071eb20d3618b5");
naughty("f0ad965f523b5c2ade071eb20d3618b5 The timestamp is not correct");
}
if ( strtotime($db['timestamp']) >= ( $_SERVER["REQUEST_TIME"] ) + 1800 ) {
# There is too long a time entering the form
naughty("6570026fd11fc31ac0cada3e1dae4d0b");
naughty("6570026fd11fc31ac0cada3e1dae4d0b Timeout. You waited too long to react. ");
}
// Basic POST Checks
if ( empty($_POST["ep_num_date"]) or strlen($_POST["ep_num_date"]) !== 15 ) {
naughty("a32fbe5f0494eb7f34034b164739314d");
naughty("a32fbe5f0494eb7f34034b164739314d The date is not correct");
}
if ( empty($_POST["email"]) ) {
naughty("76eaa1a1556faeadfc14631c35b8590a");
naughty("76eaa1a1556faeadfc14631c35b8590a The email is missing");
}
// Getting to the keep section
if ( filter_var($_POST["email"], FILTER_VALIDATE_EMAIL) === false ) {
naughty("8c307efe37146015a35e2d928c2c0f69");
naughty("8c307efe37146015a35e2d928c2c0f69 Invalid email");
}
else {
$email = htmlspecialchars(filter_var($_POST["email"], FILTER_VALIDATE_EMAIL));
}
if ( strpos($_POST["ep_num_date"], '_') !== 4 or strpos($_POST["ep_num_date"], '-') !== 9 or strpos($_POST["ep_num_date"], '-', 10 ) !== 12 ) {
naughty("705f8e26e42a90b31075a110674b19ee");
naughty("705f8e26e42a90b31075a110674b19ee The date format is not correct");
}
if ( !preg_match("/^\d{4}_\d{4}-\d{2}-\d{2}$/", $_POST["ep_num_date"]) ) {
naughty("ad7f805c2f42be77122ec52f114fe318");
naughty("ad7f805c2f42be77122ec52f114fe318 The date fails a regex");
}
else {
list($ep_num, $ep_date) = explode('_', $_POST["ep_num_date"]);
}
if ( intval($ep_num) === 0 ) {
naughty("9424f7407b2fb83407760ad763286b53");
naughty("9424f7407b2fb83407760ad763286b53 The episode number is not an integer");
}
else {
$ep_num = intval($ep_num);
}
if ( strtotime($ep_date) === false ) {
naughty("59c7bff340d023773d987d71df545110");
naughty("59c7bff340d023773d987d71df545110 The date is not a valid time");
}
else {
$ep_date_epoch = strtotime($ep_date);
@@ -122,16 +122,16 @@ $current_ep_date_epoch = strtotime($current_ep_date);
$next_year_ep_date = strtotime(date("Y-m-d", time()) . " + 365 day" );
if ( $ep_num == $row[2] or !empty($row[2]) ) {
naughty("$ep_num == $row[2] or !empty($row[2]) 47d186ad8d5b21ec7d455477ea08b023");
naughty("$ep_num == $row[2] or !empty($row[2]) 47d186ad8d5b21ec7d455477ea08b023 Could not make the reservation in the db");
}
if ( $ep_num != 9999 ) {
if ( ( $ep_num <= $current_ep_num ) OR ( $ep_num > $next_year_ep_num ) ) {
naughty("7304801e8ce3b9096d28dbe1a0faa642 $ep_num <= $current_ep_num or $ep_num > $next_year_ep_num");
naughty("7304801e8ce3b9096d28dbe1a0faa642 Episode in wrong range $ep_num <= $current_ep_num or $ep_num > $next_year_ep_num");
}
if ( $ep_date_epoch < $current_ep_date_epoch or $ep_date_epoch > $next_year_ep_date ) {
naughty("34c4259b45927da50ba5c49970f880a4");
naughty("34c4259b45927da50ba5c49970f880a4 Date in wrong range");
}
for ($slot=$current_ep_num; $slot < $next_year_ep_num; $slot++) {
@@ -141,11 +141,11 @@ if ( $ep_num != 9999 ) {
}
if ( empty($shows_slot_date["$ep_num"]) or empty($shows_date_slot["$ep_date"]) ) {
naughty("d0e113355b35f96945124d8e507759a0");
naughty("d0e113355b35f96945124d8e507759a0 This slot date is not empty");
}
if ( $ep_date !== $shows_slot_date["$ep_num"] or $ep_num !== $shows_date_slot["$ep_date"] ) {
naughty("434cb53552ce1e2708e74a42f438028c");
naughty("434cb53552ce1e2708e74a42f438028c This slot is invalid");
}
} // End of bypass checks
@@ -162,7 +162,7 @@ $query = "UPDATE reservations SET `ep_num` = '$ep_num', `ep_date` = '$ep_date',
$result = mysqli_query($connection, $query );
if(!isset($result)) {
naughty("c7405e79b54f582e8db46c69ec4b0f24");
naughty("c7405e79b54f582e8db46c69ec4b0f24 Could not write reservation to the db");
}
use PHPMailer\PHPMailer\PHPMailer;
@@ -193,8 +193,8 @@ $mailer->addBCC('admin@hackerpublicradio.org');
$mailer->addBCC('admin@hobbypublicradio.org');
$mailer->addAddress("$email");
if ( $ep_num == 9999 ) {
$mailer->Subject = "Confirmation of request to submit to the reserve queue";
$mailer->MsgHTML("<p>This email is an automatic reply to a request to submit to the reserve queue on the longest running Community Podcast.<br />
$mailer->Subject = "Confirmation of request to submit to the reserve pool";
$mailer->MsgHTML("<p>This email is an automatic reply to a request to submit to the reserve pool on the longest running Community Podcast.<br />
<em>If you have not made this request then please ignore this email.</em>
</p>
<p>
@@ -216,7 +216,7 @@ if ( $ep_num == 9999 ) {
</p>
<pre>" . date('Y-m-d\TH:i:s') . "\t" . getUserIP() . "\t" . $db_key . "\t" . $_SERVER["HTTP_USER_AGENT"] . "</pre>"
);
$mailer->AltBody = "This email is an automatic reply to a request to submit to the reserve queue on the longest running Community Podcast.
$mailer->AltBody = "This email is an automatic reply to a request to submit to the reserve pool on the longest running Community Podcast.
If you have not made this request then please ignore this email.
To confirm your request please confirm by copying and pasting the following link into your browser

View File

@@ -7,31 +7,38 @@
require "/home/hpr/php/include.php";
if ( $_SERVER['REQUEST_METHOD'] !== 'GET' and empty($_SERVER["REMOTE_ADDR"]) and count($_GET) !== 1 ) {
call412("9a77e4ab24410cbf68a3a05ba97221e4");
call412("9a77e4ab24410cbf68a3a05ba97221e4 Not a GET request");
}
logextra( "Is a GET Request" );
if ( isset( $_GET['key'] ) and strlen( $_GET['key'] ) === 45 and strlen( htmlspecialchars( stripslashes( strip_tags( $_GET['key'] ) ) ) ) === 45 and ctype_xdigit( $_GET['key'] ) ) {
$key = htmlspecialchars( stripslashes( strip_tags( $_GET['key'] ) ) );
}
else {
if ( isset( $_GET['delete'] ) and strlen( $_GET['delete'] ) === 45 and strlen( htmlspecialchars( stripslashes( strip_tags( $_GET['delete'] ) ) ) ) === 45 and ctype_xdigit( $_GET['delete'] ) ) {
$key = htmlspecialchars( stripslashes( strip_tags( $_GET['delete'] ) ) );
logextra( "Is delete request" );
}
else {
call412("e8ac90fc2a8996e5fb7a83e73e636e80");
call412("e8ac90fc2a8996e5fb7a83e73e636e80 Invalid key");
}
}
logextra( "Key is valid" );
$ip = $_SERVER["REMOTE_ADDR"];
$query = "select * FROM reservations WHERE reservations.ip = '$ip' AND reservations.key = '$key' ";
$result = mysqli_query($connection, $query);
if($result === FALSE) {
call412("91432866e3c9c36a9c4884345d578761");
call412("91432866e3c9c36a9c4884345d578761 Could not find ip=\"$ip\" AND key=\"$key\" in the database. Did your IP address change ? Was the removed after 15 Munites ?");
}
logextra( "Found ip=\"$ip\" AND key=\"$key\" in the database" );
$db = mysqli_fetch_array($result, MYSQLI_ASSOC);
if ( empty($db) or empty( $db['timestamp'] ) or empty( $db['key'] ) or empty( $db['ep_num'] ) or empty( $db['ep_date'] ) or empty( $db['email'] ) ) {
call412("b019bd29c1fe5b756e4b620a5428f730");
call412("b019bd29c1fe5b756e4b620a5428f730 The information for this reservation is not correct in the database.");
}
else {
$db_timestamp = $db['timestamp'];
@@ -41,31 +48,50 @@ else {
$ep_num = $db['ep_num'];
$ep_date = $db['ep_date'];
$db_ip = $db['ip'];
$status = $db['status'];
}
logextra( "The information for this reservation is correct in the database." );
// User selects delete
if ( isset( $_GET['delete'] ) ) {
$query = "DELETE FROM reservations WHERE reservations.ip = '$ip' AND reservations.key = '$key' ";
$result = mysqli_query($connection, $query);
if($result === FALSE) {
call412("35a7f4e80ecba8284049e9d6261ae523");
call412("35a7f4e80ecba8284049e9d6261ae523 Could not remove the reservation.");
}
else {
header( "Location: ${hubBaseurl}calendar.php" ) ;
$dir_structure = "/home/hpr/upload/" . strtotime($db_timestamp) . "_${ep_num}_${ep_date}_${db_key}/";
rrmdir("$dir_structure");
logextra( "Removed the reservation" );
exit;
}
}
logextra( "Not a delete" );
if ( empty($status) ) {
naughty("317be55a55a82110b2836499580be486 did not find a status \"$status\" in the db.");
}
logextra( "Found the status $status" );
if ($status !== 'REQUEST_EMAIL_SENT' && $status !== 'EMAIL_LINK_CLICKED') {
naughty("65743c3fb8a2e171f56ec514ec45c1bc The status \"$status\" is not expected, should be REQUEST_EMAIL_SENT or EMAIL_LINK_CLICKED in the db.");
}
logextra( "The status \"$status\" is expected, should be either REQUEST_EMAIL_SENT or EMAIL_LINK_CLICKED." );
// Set the show to verified so that we can remove the temporary lock
$status = strtotime("now") . ".EMAIL_LINK_CLICKED." . date('Y-m-d\TH:i:s\Z');
$query = "UPDATE reservations SET `verified` = '1', `status` = 'EMAIL_LINK_CLICKED' WHERE `ip` = '$db_ip' AND `timestamp` = '$db_timestamp' AND `key` = '$db_key'";
$result = mysqli_query($connection, $query );
if(!isset($result)) {
naughty("066c518314f0d3b1ad3e4af60fcf36ce");
naughty("066c518314f0d3b1ad3e4af60fcf36ce Could not change status to EMAIL_LINK_CLICKED");
}
logextra( "Updated status to EMAIL_LINK_CLICKED" );
// Display host information
/*
*/
@@ -75,7 +101,7 @@ $ip = $_SERVER["REMOTE_ADDR"];
$query = "SELECT * FROM hosts WHERE hosts.email = '$email' OR hosts.email = '$email_padded'";
$result = mysqli_query($connection, $query);
if($result === FALSE) {
call412("5cb513b590ab5859bf7603b79402a5cb");
call412("5cb513b590ab5859bf7603b79402a5cb Could not find a host with email=\"$email\"");
}
$db = mysqli_fetch_array($result, MYSQLI_ASSOC);
if ( empty($db) or empty( $db['hostid'] ) or empty( $db['host'] ) or empty( $db['email'] ) ) {
@@ -111,11 +137,11 @@ include 'header.php';
?>
<body>
<link href="quill.snow.css" rel="stylesheet">
<script src="quill.js"></script>
<link href="quill.snow.2.0.3.css" rel="stylesheet">
<script src="quill.2.0.3.js"></script>
<?php
if ( $ep_num == 9999 ) {
echo "<h2>Uploading to the Reserve Queue.</h2>\n";
echo "<h2>Uploading to the reserve pool.</h2>\n";
}
else {
echo "<h2>Uploading hpr${ep_num} for release on ${ep_date}</h2>\n";
@@ -281,14 +307,12 @@ include 'header.php';
<input type="submit" name="submit_edit" value="Submit"> This will take a <strong>long time</strong>, leave the browser running. You will get an email once the upload is complete.
<?php
if ( $ep_num == 9999 ) {
echo "<p>\n<em><a href=\"https://" . $_SERVER['SERVER_NAME'] . $_SERVER['SCRIPT_NAME'] . "?delete=$key\">Delete this reservation for the Reserve Queue</a>.</em>\n</p>\n";
echo "<p>\n<em><a href=\"https://" . $_SERVER['SERVER_NAME'] . $_SERVER['SCRIPT_NAME'] . "?delete=$key\">Delete this reservation for the reserve pool</a>.</em>\n</p>\n";
}
else {
echo "<p>\n<em><a href=\"https://" . $_SERVER['SERVER_NAME'] . $_SERVER['SCRIPT_NAME'] . "?delete=$key\">Delete this reservation for hpr${ep_num} on ${ep_date}</a>.</em>\n</p>\n";
}
?>
<div id="progressbar">
<div></div>
@@ -319,6 +343,18 @@ include 'header.php';
event.formData.append("host_profile", quill_profile.root.innerHTML);
});
// const quill = new Quill('#editor_notes', {
// modules: {
// toolbar: toolbarOptions
// },
// placeholder: 'Enter your show notes here...',
// theme: 'snow'
// });
// const form = document.querySelector("form");
// form.addEventListener("formdata", (event) => {
// event.formData.append("notes", quill.root.innerHTML);
// });
const quill = new Quill('#editor_notes', {
modules: {
toolbar: toolbarOptions
@@ -326,12 +362,34 @@ include 'header.php';
placeholder: 'Enter your show notes here...',
theme: 'snow'
});
const form = document.querySelector("form");
form.addEventListener("formdata", (event) => {
event.formData.append("notes", quill.root.innerHTML);
function prettyPrintHTML(html) {
const doc = new DOMParser().parseFromString(html, 'text/html');
return doc.body.innerHTML
.replace(/&nbsp;/g, ' ')
.replace(/></g, '>\n<');
}
const form = document.querySelector('form');
form.addEventListener('submit', function (event) {
const text = quill.getText().trim();
if (text.length < 30) {
event.preventDefault();
alert('You must provide shownotes');
}
});
form.addEventListener('formdata', event => {
const rawHTML = quill.getSemanticHTML();
const prettyHTML = prettyPrintHTML(rawHTML);
event.formData.append('notes', prettyHTML);
});
</script>
</form>
<?php
logextra( "Form displayed" );
include 'footer.php';
?>

View File

@@ -1,5 +1,5 @@
<?php
# request.php > request_confirm.php > upload.php > upload_confirm.php
# request.php > request_confirm.php > upload.php > upload_confirm.php
## Recent Changes
# TODO disabled the max notes check. We need to re-enable after we get a feel for the max length
@@ -24,7 +24,7 @@ logextra( "Got reservations" );
if ($total > 150 ) {
# This seems to indicate that we are under an attack as we never get 5 shows in the one day from different hosts.
# A host doing bulk upload will need to do them one by one
naughty("88fe2bc11a90f9f9ab9bdcc8a82d7401");
naughty("88fe2bc11a90f9f9ab9bdcc8a82d7401 Too many shows waiting - uploads have been suspended.");
}
logextra( "No bulk upload" );
// // // print '<pre>';
@@ -34,12 +34,12 @@ logextra( "No bulk upload" );
if ( $_SERVER['REQUEST_METHOD'] !== 'POST' ) {
naughty("29e9019c9615f755aec834000892ee9e");
naughty("29e9019c9615f755aec834000892ee9e, Wrong request method");
}
logextra( "It is a POST" );
if ( empty($_SERVER["REMOTE_ADDR"]) ) {
naughty("abb147a251e8db132dafa93d98f8487f");
naughty("abb147a251e8db132dafa93d98f8487f Missing remote IP address");
}
else {
$ip = $_SERVER["REMOTE_ADDR"];
@@ -51,7 +51,7 @@ if (count($_POST) !== 15) {
if (count($_POST) !== 17) {
# 19 is for mosaic
# if this reports 0 is could be that the max upload is not set correctly in php.ini.
naughty("7a994999b40e3dc2e3eecfdc36a78d23 ".count($_POST) );
naughty("7a994999b40e3dc2e3eecfdc36a78d23 Incorrect number of POST entries ".count($_POST) );
}
}
logextra( "Correct number of POST entries" );
@@ -60,7 +60,7 @@ if ( isset( $_POST['key'] ) and strlen( $_POST['key'] ) === 45 and strlen( htm
$db_key = htmlspecialchars( stripslashes( strip_tags( $_POST['key'] ) ) );
}
else {
naughty("2fb4c4e05f0e8f37a5b47565cfb863f5");
naughty("2fb4c4e05f0e8f37a5b47565cfb863f5 Field lengths are not correct");
}
logextra( "Field lengths are correct" );
@@ -70,7 +70,7 @@ $db = mysqli_fetch_array($result, MYSQLI_ASSOC);
logextra( "Getting this reservation from the db" );
if ( empty($db["ip"]) or $db["key"] != $db_key ) {
naughty("3162941738512bfdb1d21f288ee7cdb4");
naughty("3162941738512bfdb1d21f288ee7cdb4 Could not find this reservation from the db for \"$ip\" and \"$db_key\". Are you using the correct link, or did your ip address change ?");
}
else {
$db_ip = $db['ip'];
@@ -82,32 +82,32 @@ else {
logextra( "Found this reservation from the db" );
if ( empty($db_email) ) {
naughty("457bf84c726d1cbbd381933e3a08b2ac");
naughty("457bf84c726d1cbbd381933e3a08b2ac did not find a email \"$db_email\" in the db.");
}
logextra( "Got an email $db_email" );
if ( strtotime($db['timestamp']) >= $_SERVER["REQUEST_TIME"] ) {
naughty("00ad965f523b5c2ade071eb20d3618b5");
naughty("00ad965f523b5c2ade071eb20d3618b5 The Timestamp is too old");
}
logextra( "Timestamp is not to old" );
logextra( "Timestamp is not too old" );
if ( strtotime($db['timestamp']) >= ( $_SERVER["REQUEST_TIME"] ) + 1800 ) {
naughty("7570026fd11fc31ac0cada3e1dae4d0b");
naughty("7570026fd11fc31ac0cada3e1dae4d0b The Timestamp is too young");
}
logextra( "Timestamp is not to young" );
if ( empty($_POST["title"]) or strlen($_POST["title"]) > 100 ) {
naughty("32831f22fb96d02ce819127d558d28a2");
naughty("32831f22fb96d02ce819127d558d28a2 The Title length is not less than 100");
}
logextra( "Title length is OK" );
if ( empty($_POST["summary"]) or strlen( $_POST["summary"]) > 200 or strlen(str_replace('\\', '', $_POST["summary"])) > 100 ) {
naughty("ecfcc4c12bf4319d412d66fd2e239249");
naughty("ecfcc4c12bf4319d412d66fd2e239249 The summary length is not between 100 and 200");
}
logextra( "Summary length is OK" );
if ( empty($_POST["shownotes_format"]) ) {
naughty("a8345484b7a4ebad5af54937a3b2e26b");
naughty("a8345484b7a4ebad5af54937a3b2e26b The Shownotes are missing");
}
logextra( "Shownotes are not missing" );
@@ -117,107 +117,113 @@ if ( !(
strcmp($_POST["shownotes_format"], "Markdown_GitHub") === 0 or
strcmp($_POST["shownotes_format"], "Markdown_Pandoc") === 0 or
strcmp($_POST["shownotes_format"], "restructured_text") === 0 or
strcmp($_POST["shownotes_format"], "txt2tags") === 0 )
strcmp($_POST["shownotes_format"], "txt2tags") === 0 )
) {
naughty("b5609bad7edd70d76d75652fb0592ec4 " . $_POST["shownotes_format"] . " " . strcmp($_POST["shownotes_format"], "."));
naughty("b5609bad7edd70d76d75652fb0592ec4 " . $_POST["shownotes_format"] . " " . strcmp($_POST["shownotes_format"], ". The shownotes_format is not OK"));
}
logextra( "shownotes_format is set OK" );
if ( empty($_POST["explicit"]) ) {
naughty("39cc8812b02607d613c6a7ba7e789f2c");
naughty("39cc8812b02607d613c6a7ba7e789f2c The explicit flag is missing");
}
logextra( "explicit exists" );
if ( strcmp($_POST["explicit"], "Yes") !== 0 ) {
logextra( "" );
if ( strcmp($_POST["explicit"], "Clean") !== 0 ) {
naughty("198ab3b8af59ffba12c335239bde2876");
naughty("198ab3b8af59ffba12c335239bde2876 The explicit flsg is not Yes or Clean");
}
}
logextra( "explicit is either Yes or Clean" );
if ( empty($_POST["license"]) or strlen($_POST["license"]) < 4 or strlen($_POST["license"]) > 11 ) {
naughty("194c24ff7396901c0ccc42fb21344683");
naughty("194c24ff7396901c0ccc42fb21344683 The license length is not correct");
}
logextra( "license length is fine" );
if ( !(
strcmp($_POST["license"], "CC-BY-SA") === 0 or
strcmp($_POST["license"], "CC-BY-NC-SA") === 0 or
strcmp($_POST["license"], "CC-BY-NC-ND") === 0 or
strcmp($_POST["license"], "CC-0") === 0 or
strcmp($_POST["license"], "CC-BY-NC") === 0 or
strcmp($_POST["license"], "CC-BY") === 0 or
strcmp($_POST["license"], "Other") === 0 )
strcmp($_POST["license"], "CC-BY-SA") === 0 or
strcmp($_POST["license"], "CC-BY-NC-SA") === 0 or
strcmp($_POST["license"], "CC-BY-NC-ND") === 0 or
strcmp($_POST["license"], "CC-0") === 0 or
strcmp($_POST["license"], "CC-BY-NC") === 0 or
strcmp($_POST["license"], "CC-BY") === 0 or
strcmp($_POST["license"], "Other") === 0 )
) {
naughty("f5609bad7edd70d76d75652fb0592ec4");
naughty("f5609bad7edd70d76d75652fb0592ec4 The license is has an invalid value");
}
logextra( "license is a valid value" );
// TODO re-enable after we get a feel for the max length
// if ( empty($_POST["notes"]) or strlen($_POST["notes"]) > 100000 ) {
// naughty("5860799406a323209b902d5104fe7bae");
// naughty("5860799406a323209b902d5104fe7bae The shownotes are too long");
// }
// logextra( "Notes are less than max" );
if ( empty($_POST["notes"]) or strlen($_POST["notes"]) < 30 ) {
naughty("5860799406a323209b902d5104fe7bae The shownotes are too short");
}
logextra( "Notes are not too short" );
$notes_length = strlen($_POST["notes"]);
logextra( "Notes are $notes_length long." );
if ( ( empty($_POST["series"]) and ($_POST["series"] != 0 ) ) or (strlen($_POST["series"]) > 3 ) ) {
naughty("f1c83b57821d562f66246d975ef28994");
naughty("f1c83b57821d562f66246d975ef28994 The Series is either missing, zero or greater than 3 in length");
}
logextra( "The Series exists and is less than 3 but not zero" );
$series = $_POST["series"];
$result_series = mysqli_query($connection, "SELECT name FROM miniseries WHERE id='$series'");
logextra( "Series id is in the correct range" );
if (!isset($result_series)) {
naughty("27457bada69cbc352af762bdf649e905");
naughty("27457bada69cbc352af762bdf649e905 The Series id is not in the correct range");
}
$data=mysqli_fetch_assoc($result_series);
$series_name = $data['name'];
logextra( "Series has been found" );
if ( !empty($_POST["tags"]) and strlen($_POST["tags"]) > 100 ) {
naughty("49a69b565acecf9d2a96aacc73aec5aa");
naughty("49a69b565acecf9d2a96aacc73aec5aa The tags are missing or greate than 100 long");
}
logextra( "Tags are the correct length" );
if ( empty($_POST["host_name"]) or strlen($_POST["host_name"]) > 40 ) {
naughty("626eae845e0a448be0544775ab5e4dc4");
naughty("626eae845e0a448be0544775ab5e4dc4 The hostname is missing or greater than 40 long");
}
logextra( "host_name is set and correct length" );
if ( strlen($_POST["host_profile"]) > 2000 ) {
naughty("f69ec5999e0a02def5a110489401347f");
naughty("f69ec5999e0a02def5a110489401347f The Host profile exceeds 2000");
}
logextra( "host_profile is correct length" );
if ( empty($_POST["host_license"]) or strlen($_POST["host_license"]) < 4 or strlen($_POST["host_license"]) > 11 ) {
naughty("f2816b32e97be090a96ceabdc9230c9c");
naughty("f2816b32e97be090a96ceabdc9230c9c The host license length is not correct");
}
logextra( "host_license is in the correct range" );
logextra( "host_license is in the correct range " );
if ( !(
strcmp($_POST["host_license"], "CC-BY-SA") === 0 or
strcmp($_POST["host_license"], "CC-BY-NC-SA") === 0 or
strcmp($_POST["host_license"], "CC-BY-NC-ND") === 0 or
strcmp($_POST["host_license"], "CC-0") === 0 or
strcmp($_POST["host_license"], "CC-BY-NC") === 0 or
strcmp($_POST["host_license"], "CC-BY") === 0 or
strcmp($_POST["host_license"], "Other") === 0 )
strcmp($_POST["host_license"], "CC-BY-SA") === 0 or
strcmp($_POST["host_license"], "CC-BY-NC-SA") === 0 or
strcmp($_POST["host_license"], "CC-BY-NC-ND") === 0 or
strcmp($_POST["host_license"], "CC-0") === 0 or
strcmp($_POST["host_license"], "CC-BY-NC") === 0 or
strcmp($_POST["host_license"], "CC-BY") === 0 or
strcmp($_POST["host_license"], "Other") === 0 )
) {
naughty("978a18fa8558f3180897429e63d6ae55");
naughty("978a18fa8558f3180897429e63d6ae55 The show license is has an invalid value");
}
logextra( "host_license is a predfined value" );
if ( empty($_POST["hostid"]) and $_POST["hostid"] != 0 ) {
naughty("277dc98d43e7840d9f296cce1bc3ec2c");
naughty("277dc98d43e7840d9f296cce1bc3ec2c The hostid is missing or is 0");
}
logextra( "hostid exists and is not 0" );
$result = mysqli_query($connection, 'SELECT MAX(hostid) as max FROM hosts;');
if (!isset($result)) {
naughty("93fcc22d0c5ee3fac35e6d658db76059");
naughty("93fcc22d0c5ee3fac35e6d658db76059 Failed to retrieve the max host from db");
}
$data=mysqli_fetch_assoc($result);
$maxhost = $data['max'];
@@ -227,21 +233,21 @@ logextra( "retrieved the max host from db" );
$hostid = $_POST["hostid"];
logextra( "" );
if ( (strval(intval($hostid)) != strval($hostid)) or ( intval($hostid) < 0 ) or ( intval($hostid) > $maxhost ) ){
naughty("a0f6cae871b85cb66f85d7ed5e91d1bb");
naughty("a0f6cae871b85cb66f85d7ed5e91d1bb The host id is not an int, or the range is not correct");
}
logextra( "host id is int, and in the correct range" );
if ( !empty($_POST["url"]) and strlen($_POST["url"]) > 1024 ) {
naughty("6d4f180c49ff9b9154bd80070ec2c1f3");
naughty("6d4f180c49ff9b9154bd80070ec2c1f3 The url is not set or is not the correct length");
}
logextra( "The url is set and the correct length" );
if ( !empty($_POST["url"]) ) {
if ( filter_var($_POST["url"], FILTER_VALIDATE_URL) === false ) {
naughty("9c307efe37146015a35e2d928c2c0f69");
naughty("9c307efe37146015a35e2d928c2c0f69 The url has been altered");
}
else {
$url = htmlspecialchars(filter_var($_POST["url"], FILTER_VALIDATE_URL));
$url = htmlspecialchars(filter_var($_POST["url"], FILTER_VALIDATE_URL));
}
}
logextra( "The url has not been altered" );
@@ -249,17 +255,17 @@ logextra( "The url has not been altered" );
$dir_structure = "/home/hpr/upload/" . strtotime($db_timestamp) . "_${ep_num}_${ep_date}_${db_key}/";
if ( file_exists( $dir_structure ) ) {
naughty("d4250c369bd81b27cdc53d0d53321ecd");
naughty("d4250c369bd81b27cdc53d0d53321ecd There is an error with the upload dir");
}
logextra( "The upload dir seems fine $dir_structure" );
if (!mkdir($dir_structure, 0777, true)) {
naughty("804c4be123ca0327840b76bf4f8eb19e");
naughty("804c4be123ca0327840b76bf4f8eb19e The upload directory could not be created");
}
$shownote_file_json = "${dir_structure}/shownotes.json";
if ( file_exists( $shownote_file_json ) ) {
naughty("85c8df74d172794c49233c1a94c299fd");
naughty("85c8df74d172794c49233c1a94c299fd The shownotes json file is missing");
}
logextra( "The shownotes json file exists $shownote_file_json" );
@@ -304,12 +310,12 @@ $shownote_file_json_length = strlen( json_encode( $show_data_json ) );
logextra( "Wrote the shownotes which are $shownote_file_json_length long" );
if ( !file_exists( $dir_structure ) ) {
naughty("a1534e6d525352dce7183a2e22862049");
naughty("a1534e6d525352dce7183a2e22862049 The dir_structure is missing");
}
logextra( "The dir_structure still exists" );
if ( !file_exists( "$dir_structure/shownotes.json" ) ) {
naughty("3eb02d6b9ea801d4c5909b4fac0ccd96");
naughty("3eb02d6b9ea801d4c5909b4fac0ccd96 The shownotes.json is missing");
}
logextra( "shownotes.json still exists" );
@@ -318,7 +324,7 @@ $message="";
if ( !empty($_FILES["host_photo"]["tmp_name"]) and !empty($_FILES["host_photo"]["type"]) and $_FILES["host_photo"]["error"] == 0 ) {
list($type_main, $type_sub)= explode("/", $_FILES["host_photo"]["type"]);
if ( empty($type_sub) or strlen($type_sub) > 4 ) {
naughty("c1381f1d2492f81074d8cb70c85f5fc8");
naughty("c1381f1d2492f81074d8cb70c85f5fc8 There was an issue with the upload");
}
else {
$temp_photo = $_FILES["host_photo"]["tmp_name"];
@@ -350,7 +356,7 @@ else {
You have chosen to upload the files separately from these show notes.
If you wish to send a show using another method then please discuss
If you wish to send a show using another method then please discuss
it with the HPR Volunteer at admin@hackerpublicradio.org
";
@@ -379,7 +385,7 @@ foreach($_FILES["media_files"]["tmp_name"] as $key => $val) {
logextra( "All Files moved" );
########################################################
// OK You convinced me.
// OK You convinced me.
if ( $ep_num == 9999 ) {
$show_submitted = "RESERVE_SHOW_SUBMITTED";
@@ -400,12 +406,12 @@ if (mysqli_errno($connection)) {
}
logextra( "Updating the db to $show_submitted" );
if (!isset($result)) {
naughty("76ec33229ca023336a2b1c649b0491f5");
naughty("76ec33229ca023336a2b1c649b0491f5 There was a problem updating the db");
}
$body="give";
//$body="index_full";
include 'header.php';
include 'header.php';
?>
<article>
@@ -430,7 +436,7 @@ include 'header.php';
<?php
logextra( "Sending email" );
# TODO check for both url and file upload
# TODO check for both url and file upload
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;
@@ -442,7 +448,7 @@ require_once('/home/hpr/php/PHPMailer/SMTP.php');
date_default_timezone_set('Etc/UTC');
$mailer = new PHPMailer(true);
$mailer = new PHPMailer(true);
$mailer->isSMTP();
$mailer->Host = "$mailerHost";
$mailer->SMTPAuth = true;
@@ -460,9 +466,9 @@ $mailer->addBCC('admin@hobbypublicradio.org');
$mailer->AddAddress("$db_email");
$mailer->isHTML(false);
if ( $ep_num == "9999" ) {
$mailer->Subject = "Thank you for uploading to the Reserve Queue";
$mailer->Subject = "Thank you for uploading to the reserve pool";
$mailer->MsgHTML("<p><em>This email is an automatic reply. If you have not made this request then please ignore this email.</em></p>
<p>Thank You for recording an episode for the Reserve Queue.</p>
<p>Thank You for recording an episode for the reserve pool.</p>
<pre>
$message
</pre>

View File

@@ -1,11 +1,11 @@
RewriteEngine on
RewriteCond %{HTTP_USER_AGENT} (ClaudeBot|DataForSeoBot|MJ12bot|AhrefsBot|AwarioBot|BLEXBot|dotbot|PetalBot|SemrushBot*|SiteAuditBot|SplitSignalBot|Yandex) [NC]
RewriteCond %{HTTP_USER_AGENT} (AhrefsBot|anthropic-ai|AwarioBot|Barkrowler|BLEXBot|CCbot|ClaudeBot|Claude-Web|DataForSeoBot|dotbot|FacebookBot|Go-http-client|Google-Extended|GPTBot|GPTBot*|MJ12bot|PetalBot|PiplBot|SemrushBot*|SiteAuditBot|SplitSignalBot|Yandex|Thinkbot|Barkrowler|SemrushBot) [NC]
RewriteRule (.*) - [F,L]
RewriteRule "^comments_rss.php$" "/comments.rss" [R]
RewriteRule "^live$" "https://stream.lugcast.mywire.org/stream" [R=301,NE,L]
RewriteRule "^live$" "https://files.shownotes.ooguy.com/stream" [R=301,NE,L]
RewriteRule "^maillist$" "https://lists.hackerpublicradio.com/mailman/listinfo/hpr" [R=301,NE,L]
RewriteRule "^download.php" "/syndication.html" [R=301,NE,L]
RewriteRule "^about.php|^help_out.php" "/about.html" [R=301,NE,L]
@@ -20,6 +20,8 @@ RewriteRule "^correspondents.php" "/correspondents/index.html" [R=301,NE,L]
RewriteRule "^index_full.php|^show.php|^index.php|^twat.php" "/eps/index.html" [R=301,NE,L]
RewriteRule "hosts/ken_fallon" "https://hackerpublicradio.org/correspondents/0030.html" [R=301,NE,L]
RewriteRule "^eps/hpr([0-9]{4})\.(mp3|ogg|opus|spx|flac|wav)$" "https://hub.hackerpublicradio.org/ccdn.php?filename=/eps/hpr$1/hpr$1.$2" [redirect=301,last]
RewriteRule "^calendar.php$" "http://hub.hackerpublicradio.org/calendar.php" [R,L]
ErrorDocument 404 /404.shtml
@@ -43,10 +45,6 @@ RewriteCond %{QUERY_STRING} ^(.*)(?:^|&)fbclid=(?:[^&]*)((?:&|$).*)$ [NC]
RewriteCond %1%2 (^|&)([^&].*|$)
RewriteRule ^(.*) /$1?%2 [R=301,L]
# Redirect episodes to archive.org
RewriteRule "eps/hpr([0-9]{4})\.(ogg|mp3|spx|wav|flac|opus)" "https://archive.org/download/hpr$1/hpr$1.$2"
RewriteRule "local/hpr([0-9]{4})\.(ogg|mp3|spx|wav|flac|opus)" "https://archive.org/download/hpr$1/hpr$1.$2" [R=301,L]
# Rewrite the host series and episode pages
RewriteCond %{QUERY_STRING} id=(\d{1})$
@@ -86,5 +84,5 @@ Allow from all
</Files>
<IfModule headers_module>
header set X-Clacks-Overhead "GNU Terry Pratchett"
header set X-Clacks-Overhead "GNU Terry Pratchett, FiftyOneFifty, Lord Drachenblut"
</IfModule>