diff --git a/8chan-captcha/entrypoint.php b/8chan-captcha/entrypoint.php index 213ddb6f..26849939 100644 --- a/8chan-captcha/entrypoint.php +++ b/8chan-captcha/entrypoint.php @@ -54,7 +54,7 @@ case "check": $query = prepare("DELETE FROM `captchas` WHERE `cookie` = ? AND `extra` = ?"); $query->execute([$_GET['cookie'], $_GET['extra']]); - if ($ary[0]['text'] !== $_GET['text']) { + if (strtolower($ary[0]['text']) !== strtolower($_GET['text'])) { echo "0"; } else { diff --git a/board-search.php b/board-search.php index 484467b4..07bf8c88 100644 --- a/board-search.php +++ b/board-search.php @@ -55,6 +55,11 @@ if (isset( $_GET['tags'] ) && $_GET['tags'] != "") { } $search['tags'] = array_splice( $search['tags'], 0, 5 ); + + foreach ($search['tags'] as &$tag) + { + $tag = strtolower( $tag ); + } } // What time range? @@ -64,7 +69,7 @@ if (isset( $_GET['time'] ) && is_numeric( $_GET['time'] ) ) { // Include what in the uri / title / subtitle? if (isset( $_GET['title'] ) && $_GET['title'] != "") { - $search['title'] = $_GET['title']; + $search['title'] = strtolower( $_GET['title'] ); } /* Search boards */ @@ -92,10 +97,10 @@ foreach ($boards as $board) { if (strpos("/{$board['uri']}/", $search['title']) !== false) { $board['weight'] = 30; } - else if (strpos($board['title'], $search['title']) !== false) { + else if (strpos(strtolower($board['title']), $search['title']) !== false) { $board['weight'] = 20; } - else if (strpos($board['subtitle'], $search['title']) !== false) { + else if (strpos(strtolower($board['subtitle']), $search['title']) !== false) { $board['weight'] = 10; } else { diff --git a/faq.php b/faq.php index a3f4cc88..35408d3f 100644 --- a/faq.php +++ b/faq.php @@ -70,12 +70,14 @@ $body = <<Make sure you are using the volunteer interface to view your board. The URL of your browser should be https://8ch.net/mod.php?/yourboard.

If you are the owner of the board, put "## Board Owner" in the name field. If someone else is the owner and you are just assisting them, put "## Board Volunteer" in the name field. Write your post and click "Reply". It will appear with your capcode.

-

Help! The owner of X board is doing something I don't like!

-

If they aren't doing anything illegal, I can't help you. I don't dictate how board owners should manage their boards.

-

If they are doing something illegal, email me.

- -

Can you give me X board?

-

If the owner of the board is inactive or the board is broken due to bad CSS, sure. Send me an email. You can see a list of boards that qualify for being taken over here.

+

Help! The owner of X board is doing something I don't like! Can I have X board?

+

If they aren't doing anything illegal, I can't help you. I don't dictate how board owners should manage their boards outside of a few conditions:

+
    +
  1. the board owner nukes the board either by deleting all the posts or banning so much IP space hardly anyone can post
  2. +
  3. the board owner implements CSS which makes posting impossible or very difficult, and someone wants to use the board name for something else
  4. +
  5. the board owner allows illegal content to be posted, or states in the rules that the global rule doesn't apply
  6. +
+

If they are, email me.

Can you add some new feature?

Open a Github issue. Better yet, write it yourself and open a pull request. @@ -164,9 +166,8 @@ Assuming the /b/ board, they are as follows:

The current key fingerprint is 6F12 EC72 A82A BCA3 5235 063A 10DD C983 901A A183.

How do I donate?

-

Donations can be sent to 1NpQaXqmCBji6gfX8UgaQEmEstvVY7U32C (Bitcoin) or LUPgSCJt3iGeJXUETVhmnbQ89Riaq1yjZm (Litecoin).

+

Donations can be sent to 1NpQaXqmCBji6gfX8UgaQEmEstvVY7U32C (Bitcoin) or LgNczzSm64C3BmaXyFVQnM3PvcmSd196f6 (Litecoin).

I am also a big fan of Monero (XMR). You can send XMR to our OpenAlias in the simplewallet client, or simply send to 49dBJhGhYFxJEfydS6hH6GRyg1W4cDgupdNVtw7j1WtcUY7xPXwNLw6fUVay644viaCcEhMFG1Z7SjjxRXEFDdNWJdvH9kS.

-

If you would like to support development of the engine that 8chan runs on (infinity), you may also Flattr this.

Are you really a cripple?

Yes.

Mamoru diff --git a/inc/8chan-mod-pages.php b/inc/8chan-mod-pages.php index 7569b986..17e1306d 100644 --- a/inc/8chan-mod-pages.php +++ b/inc/8chan-mod-pages.php @@ -528,8 +528,14 @@ FLAGS; $force_subject_op = isset($_POST['force_subject_op']) ? 'true' : 'false'; $force_flag = isset($_POST['force_flag']) ? 'true' : 'false'; $tor_posting = isset($_POST['tor_posting']) ? 'true' : 'false'; + $tor_image_posting = isset($_POST['tor_image_posting']) ? 'true' : 'false'; $new_thread_capt = isset($_POST['new_thread_capt']) ? 'true' : 'false'; $oekaki = ($imgboard || $fileboard) && isset($_POST['oekaki']) ? 'true' : 'false'; + $view_bumplock = isset($_POST['view_bumplock']) ? '-1' : 'MOD'; + + if (($tor_image_posting === 'true') && isset($_POST['meta_noindex'])) { + error('Please index your board to enable this.'); + } if ($_POST['locale'] !== 'en' && in_array($_POST['locale'], $possible_languages)) { $locale = "\$config['locale'] = '{$_POST['locale']}.UTF-8';"; @@ -706,12 +712,14 @@ FLAGS; \$config['force_subject_op'] = $force_subject_op; \$config['force_flag'] = $force_flag; \$config['tor_posting'] = $tor_posting; +\$config['tor_image_posting'] = $tor_image_posting; \$config['new_thread_capt'] = $new_thread_capt; \$config['hour_max_threads'] = $hour_max_threads; \$config['reply_limit'] = $reply_limit; \$config['max_pages'] = $max_pages; \$config['max_newlines'] = $max_newlines; \$config['oekaki'] = $oekaki; +\$config['mod']['view_bumplock'] = $view_bumplock; $code_tags $katex $replace $multiimage $allow_flash $allow_pdf $user_flags $assets $locale @@ -735,7 +743,7 @@ EOT; foreach ($matched[0] as $match) { $match_okay = false; foreach ($config['allowed_offsite_urls'] as $allowed_url) { - if (strpos($match, $allowed_url) !== false && strpos($match, '#') === false) { + if (strpos($match, $allowed_url) !== false && strpos($match, '#') === false && strpos($match, '?') === false && strpos($match, ';') === false) { $match_okay = true; } } diff --git a/inc/functions.php b/inc/functions.php index 3c8b2366..e866100f 100755 --- a/inc/functions.php +++ b/inc/functions.php @@ -951,7 +951,9 @@ function fetchBoardActivity( array $uris = array(), $forTime = false, $detailed } // Set the active posters as the unserialized array. - $boardActivity['active'][$bsRow['stat_uri']] = unserialize( $bsRow['author_ip_array'] ); + $uns = @unserialize($bsRow['author_ip_array']); + if (!$uns) continue; + $boardActivity['active'][$bsRow['stat_uri']] = $uns; // Start the average PPH off at the current post count. $boardActivity['average'][$bsRow['stat_uri']] = $bsRow['post_count']; } @@ -970,7 +972,9 @@ function fetchBoardActivity( array $uris = array(), $forTime = false, $detailed } // Merge our active poster arrays. Unique counting is done below. - $boardActivity['active'][$bsRow['stat_uri']] = array_merge( $boardActivity['active'][$bsRow['stat_uri']], unserialize( $bsRow['author_ip_array'] ) ); + $uns = @unserialize($bsRow['author_ip_array']); + if (!$uns) continue; + $boardActivity['active'][$bsRow['stat_uri']] = array_merge( $boardActivity['active'][$bsRow['stat_uri']], $uns ); // Add our post count to the average. Averaging is done below. $boardActivity['average'][$bsRow['stat_uri']] += $bsRow['post_count']; } @@ -1019,7 +1023,7 @@ function fetchBoardTags( $uris ) { $boardTags[ $tagRow['uri'] ] = array(); } - $boardTags[ $tagRow['uri'] ][] = $tag; + $boardTags[ $tagRow['uri'] ][] = strtolower( $tag ); } } @@ -2553,7 +2557,7 @@ function strip_combining_chars($str) { $o = 0; $ord = ordutf8($char, $o); - if ( ($ord >= 768 && $ord <= 879) || ($ord >= 7616 && $ord <= 7679) || ($ord >= 8400 && $ord <= 8447) || ($ord >= 65056 && $ord <= 65071)){ + if ( ($ord >= 768 && $ord <= 879) || ($ord >= 1750 && $ord <= 1773) || ($ord >= 3655 && $ord <= 3659) || ($ord >= 7616 && $ord <= 7679) || ($ord >= 8400 && $ord <= 8447) || ($ord >= 65056 && $ord <= 65071)){ continue; } diff --git a/inc/instance-config.php b/inc/instance-config.php index 14ba4833..2aa2ecf8 100644 --- a/inc/instance-config.php +++ b/inc/instance-config.php @@ -58,7 +58,7 @@ $config['allowed_ext_files'][] = 'mp4'; $config['webm']['use_ffmpeg'] = true; $config['webm']['allow_audio'] = true; - $config['webm']['max_length'] = 60 * 30; + $config['webm']['max_length'] = 60 * 120; // Mod shit $config['mod']['groups'][25] = 'GlobalVolunteer'; diff --git a/post.php b/post.php index 576a17bd..3bee1913 100644 --- a/post.php +++ b/post.php @@ -449,8 +449,8 @@ elseif (isset($_POST['post'])) { $tor = checkDNSBL(); if ($tor && !(isset($_SERVER['HTTP_X_TOR'], $_SERVER['REMOTE_ADDR']) && $_SERVER['REMOTE_ADDR'] == '127.0.0.2' && $_SERVER['HTTP_X_TOR'] = 'true')) error('To post on 8chan over Tor, you must use the hidden service for security reasons. You can find it at http://fullchan4jtta4sx.onion.'); - if ($tor && $post['has_file']) - error('Sorry. Tor users can\'t upload files.'); + if ($tor && $post['has_file'] && !$config['tor_image_posting']) + error('Sorry. Tor users can\'t upload files on this board.'); if ($tor && !$config['tor_posting']) error('Sorry. The owner of this board has decided not to allow Tor posters for some reason...'); @@ -946,7 +946,7 @@ elseif (isset($_POST['post'])) { // Commit the post to the database. $post['id'] = $id = post($post); - insertFloodPost($post); + if (!$tor) insertFloodPost($post); // Update statistics for this board. updateStatisticsForPost( $post ); diff --git a/stylesheets/style.css b/stylesheets/style.css index 1c33f5d0..3865e3f7 100644 --- a/stylesheets/style.css +++ b/stylesheets/style.css @@ -1657,8 +1657,8 @@ td.board-tags a.tag-link { .announcement { font-size: 75%; padding-bottom: 1%; - margin-left: 25%; - margin-right: 25%; + margin-left: 5%; + margin-right: 5%; } /* Gallery view */ diff --git a/templates/8chan/dnsbls.html b/templates/8chan/dnsbls.html index 0e346a00..ae447923 100644 --- a/templates/8chan/dnsbls.html +++ b/templates/8chan/dnsbls.html @@ -1,8 +1,6 @@
-

{% trans %}Your IP is listed in our DNSBL. To stop attackers, we require users who use certain IP ranges to pass a test which proves they are human every 24 hours.{% endtrans %}

-

{% trans %}Tor users need to fill out the CAPTCHA every 3 hours or 5 posts.{% endtrans %}

- -

{% trans %}It is also possible that the site is currently under attack and we are requiring everyone to pass the test right now. Sorry for the inconvenience.{% endtrans %}

+

{% trans %}Please fill out the CAPTCHA below to make your post. This is required once every 24 hours for normal users.{% endtrans %} +

{% trans %}Tor users need to fill out the CAPTCHA every 3 hours or 5 posts, and must have cookies enabled so they can keep the "tor" cookie.{% endtrans %}

{{ ayah_html|raw }} diff --git a/templates/mod/flags.html b/templates/mod/flags.html index ec65618a..18c717ec 100644 --- a/templates/mod/flags.html +++ b/templates/mod/flags.html @@ -22,7 +22,7 @@

{% trans %}Flags are likely heavily cached by your browser and the website. Please give them time to update if you change one!{% endtrans %}

{% for flag, description in config.user_flags %} - + {% endfor %} diff --git a/templates/mod/settings.html b/templates/mod/settings.html index 2bfc680a..becac62e 100644 --- a/templates/mod/settings.html +++ b/templates/mod/settings.html @@ -42,7 +42,7 @@ {% trans %}Automatically convert ... to …{% endtrans %} {% trans %}Disallow combining characters ("Zalgo", Vietnamese text){% endtrans %} {% trans %}No index{% endtrans %}
{% trans %}Hide from boards index
and do not index in search engines{% endtrans %}
- {% trans %}Archive my board on 8archive.moe{% endtrans %}
{% trans %}This archives your board on 8archive.moe if you opt in{% endtrans %} + {% trans %}Archive my board on 8archive.moe{% endtrans %}
{% trans %}This archives your board on 8archive.moe if you opt in (broken at the moment){% endtrans %} {% trans %}[code] tags{% endtrans %} {% trans %}Oekaki{% endtrans %} {% trans %}Format math between $${% endtrans %} @@ -52,7 +52,9 @@ {% trans %}Don't allow users to repost images (whole board){% endtrans %} {% trans %}Don't allow users to repost images (same thread){% endtrans %} {% trans %}Allow a poster to delete his own posts{% endtrans %} - {% trans %}Allow posters to post via the Tor onion router{% endtrans %}
Disabling this is evil, but if you really care about "ban evasion", here you go. + {% trans %}Allow posters to see when a thread is bumplocked{% endtrans %} + {% trans %}Allow posters to post via the Tor onion router{% endtrans %} + {% trans %}Allow posters to post upload files via Tor (trial){% endtrans %} {% trans %}Enable CAPTCHA{% endtrans %}
Users must solve a CAPTCHA in order to post.
This is not ReCAPTCHA, it is custom to 8chan.
{% trans %}Enable CAPTCHA for thread creation only{% endtrans %}
Users must solve a CAPTCHA in order to create new threads,
but do not have to solve a CAPTCHA in order to post replies.
{% trans %}Public bans{% endtrans %}
{% trans %}Displays your bans for the public{% endtrans %} diff --git a/templates/post/mod_attributes.html b/templates/post/mod_attributes.html index 0eb89747..04df0496 100644 --- a/templates/post/mod_attributes.html +++ b/templates/post/mod_attributes.html @@ -12,7 +12,7 @@ Locked {% endif %} {% endif %} -{% if post.bumplocked and (config.mod.view_bumplock < 0 or (post.mod and post.mod|hasPermission(config.mod.view_bumplock, board.uri))) %} +{% if post.sage and (config.mod.view_bumplock < 0 or (mod and mod|hasPermission(config.mod.view_bumplock, board.uri))) %} {% if config.font_awesome %} {% else %}