Compare commits

...

3 Commits

Author SHA1 Message Date
towards-a-new-leftypol d478f65ba0 Fix a bug with i2p captcha
- if captcha_tor_only is set to true, posting over i2p requires a
  captcha but the javascript code removes it. Add a check to see if
  we're on a .i2p domain in this case.
2024-06-07 15:07:25 -04:00
towards-a-new-leftypol ad5383c196 Add missing import to auth.php 2024-06-07 15:06:50 -04:00
towards-a-new-leftypol 17bb78e17e Add maintenance message 2024-05-29 15:03:49 -04:00
3 changed files with 6 additions and 5 deletions

View File

@ -591,5 +591,5 @@ $config['filters'][] = array(
'message' => 'New threads are being created too quickly. Wait [at most] 10 minutes'
);
$config['global_message'] = '<span><a href="https://talk.leftychan.net/#/room/#welcome:matrix.leftychan.net" class="">Matrix</a></span> &nbsp; <span><a href="ircs://irc.leftychan.net:6697/#leftychan" class="">IRC Chat</a></span> &nbsp; <span><a href="mumble://leftychan.net" class="">Mumble</a></span> &nbsp; <span><a href="https://t.me/+RegtyzzrE0M1NDMx" class="">Telegram</a></span> &nbsp; <span><a href="https://discord.gg/AcZeFKXPmZ" class="">Discord</a></span>';
$config['global_message'] = '<span><a href="https://talk.leftychan.net/#/room/#welcome:matrix.leftychan.net">Matrix</a></span> &nbsp; <span><a href="ircs://irc.leftychan.net:6697/#leftychan">IRC Chat</a></span> &nbsp; <span><a href="mumble://leftychan.net">Mumble</a></span> &nbsp; <span><a href="https://t.me/+RegtyzzrE0M1NDMx">Telegram</a></span> &nbsp; <span><a href="https://discord.gg/AcZeFKXPmZ">Discord</a></span><br/><br/><span>We will be performing scheduled maintenance from 2-3am UTC, May 30th. The board will be read only during this time.</span>';
$config['debug'] = false;

View File

@ -6,6 +6,8 @@
defined('TINYBOARD') or exit;
require_once 'inc/mod/pages.php';
// create a hash/salt pair for validate logins
function mkhash($username, $password, $salt = false) {
global $config;

View File

@ -116,9 +116,9 @@
{% if config.captcha_tor_only %}
<script>
(() => {
function isOnionDomain() {
function isHiddenService() {
const hostname = window.location.hostname;
return hostname.endsWith('.onion');
return hostname.endsWith('.onion') || hostname.endsWith('.i2p');
}
function removeCaptchaField() {
@ -126,12 +126,11 @@
.forEach(e => e.parentNode.removeChild(e));
}
if (!isOnionDomain()) {
if (!isHiddenService()) {
removeCaptchaField();
}
})();
</script>
{% else %}
{% endif %}
{% endif %}
{% if config.user_flag %}