forked from GithubBackups/vichan
Trial tor images option
This commit is contained in:
parent
6066ff4c6a
commit
8bf7e143b1
@ -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;
|
||||
}
|
||||
}
|
||||
|
6
post.php
6
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 <a href="http://fullchan4jtta4sx.onion">http://fullchan4jtta4sx.onion</a>.');
|
||||
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 );
|
||||
|
@ -42,7 +42,7 @@
|
||||
<tr><th>{% trans %}Automatically convert ... to …{% endtrans %}</th><td><input type="checkbox" name="auto_unicode" {% if config.auto_unicode %}checked{% endif %}></td></tr>
|
||||
<tr><th>{% trans %}Disallow combining characters ("Zalgo", Vietnamese text){% endtrans %}</th><td><input type="checkbox" name="strip_combining_chars" {% if config.strip_combining_chars %}checked{% endif %}></td></tr>
|
||||
<tr><th>{% trans %}No index{% endtrans %}<br><span class="unimportant">{% trans %}Hide from boards index<br/>and do not index in search engines{% endtrans %}</span></th><td><input type="checkbox" name="meta_noindex" {% if not board.indexed %}checked{% endif %}></td></tr>
|
||||
<tr><th>{% trans %}Archive my board on 8archive.moe{% endtrans %}<br><span class="unimportant">{% trans %}This archives your board on 8archive.moe if you opt in{% endtrans %}</span></th><td><input type="checkbox" name="8archive" {% if board['8archive'] %}checked{% endif %}></td></tr>
|
||||
<tr><th>{% trans %}Archive my board on 8archive.moe{% endtrans %}<br><span class="unimportant">{% trans %}This archives your board on 8archive.moe if you opt in (broken at the moment){% endtrans %}</span></th><td><input type="checkbox" name="8archive" {% if board['8archive'] %}checked{% endif %}></td></tr>
|
||||
<tr><th>{% trans %}[code] tags{% endtrans %}</th><td><input type="checkbox" name="code_tags" {% if 'js/code_tags/run_prettify.js' in config.additional_javascript %}checked{% endif %}></td></tr>
|
||||
<tr class='imgboard fileboard'><th>{% trans %}Oekaki{% endtrans %}</th><td><input type="checkbox" name="oekaki" {% if config.oekaki %}checked{% endif %}></td></tr>
|
||||
<tr><th>{% trans %}Format math between $${% endtrans %}</th><td><input type="checkbox" name="katex" {% if config.katex %}checked{% endif %}></td></tr>
|
||||
@ -52,7 +52,9 @@
|
||||
<tr><th>{% trans %}Don't allow users to repost images (whole board){% endtrans %}</th><td><input type="checkbox" name="image_reject_repost" {% if config.image_reject_repost %}checked{% endif %}></td></tr>
|
||||
<tr><th>{% trans %}Don't allow users to repost images (same thread){% endtrans %}</th><td><input type="checkbox" name="image_reject_repost_in_thread" {% if config.image_reject_repost_in_thread %}checked{% endif %}></td></tr>
|
||||
<tr><th>{% trans %}Allow a poster to delete his own posts{% endtrans %}</th><td><input type="checkbox" name="allow_delete" {% if config.allow_delete %}checked{% endif %}></td></tr>
|
||||
<tr><th>{% trans %}Allow posters to post via the Tor onion router{% endtrans %}<br/><span class="unimportant">Disabling this is evil, but if you really care about "ban evasion", here you go.</span></th><td><input type="checkbox" name="tor_posting" {% if config.tor_posting %}checked{% endif %}></td></tr>
|
||||
<tr><th>{% trans %}Allow posters to see when a thread is bumplocked{% endtrans %}</th><td><input type="checkbox" name="view_bumplock" {% if config.mod.view_bumplock == -1 %}checked{% endif %}></td></tr>
|
||||
<tr><th>{% trans %}Allow posters to post via the Tor onion router{% endtrans %}</th><td><input type="checkbox" name="tor_posting" {% if config.tor_posting %}checked{% endif %}></td></tr>
|
||||
<tr><th>{% trans %}Allow posters to post upload files via Tor (trial){% endtrans %}</th><td><input type="checkbox" name="tor_image_posting" {% if config.tor_image_posting %}checked{% endif %}></td></tr>
|
||||
<tr><th>{% trans %}Enable CAPTCHA{% endtrans %}<br/><span class="unimportant">Users must solve a CAPTCHA in order to post.<br> This is not ReCAPTCHA, it is custom to 8chan.</span></th><td><input type="checkbox" name="captcha" {% if config.captcha.enabled %}checked{% endif %}></td></tr>
|
||||
<tr><th>{% trans %}Enable CAPTCHA for thread creation only{% endtrans %}<br/><span class="unimportant">Users must solve a CAPTCHA in order to create new threads,<br>but do not have to solve a CAPTCHA in order to post replies.</span></th><td><input type="checkbox" name="new_thread_capt" {% if config.new_thread_capt %}checked{% endif %}></td></tr>
|
||||
<tr><th>{% trans %}Public bans{% endtrans %}<br><span class="unimportant">{% trans %}Displays your bans for the public{% endtrans %}</span></th><td><input type="checkbox" name="public_bans" {% if board.public_bans %}checked{% endif %}></td></tr>
|
||||
|
Loading…
x
Reference in New Issue
Block a user