From 63c39ebe904fe46aeaf645e4967b1f6a4e2b609c Mon Sep 17 00:00:00 2001 From: Kibi Kelburton Date: Mon, 27 Jul 2026 10:26:05 +0200 Subject: [PATCH 1/2] deactivate captcha for onion --- src/inc/routes/register.mjs | 5 +++-- src/index.mjs | 3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/inc/routes/register.mjs b/src/inc/routes/register.mjs index 58ada39..640bdb8 100644 --- a/src/inc/routes/register.mjs +++ b/src/inc/routes/register.mjs @@ -88,8 +88,9 @@ export default (router, tpl) => { return renderError("Passwords do not match."); } - // reCAPTCHA verification - if (cfg.recaptcha?.enabled && cfg.recaptcha?.secret_key) { + // reCAPTCHA verification (bypassed for .onion requests as Google reCAPTCHA cannot validate .onion domains) + const isOnion = req.headers['host']?.endsWith('.onion'); + if (!isOnion && cfg.recaptcha?.enabled && cfg.recaptcha?.secret_key) { const rcToken = req.post['g-recaptcha-response']; if (!rcToken) return renderError("Please complete the reCAPTCHA."); try { diff --git a/src/index.mjs b/src/index.mjs index 6695f6c..bf9dcf7 100644 --- a/src/index.mjs +++ b/src/index.mjs @@ -1496,6 +1496,9 @@ process.on('uncaughtException', err => { } if (req) { + if (req.headers['host']?.endsWith('.onion')) { + data.recaptcha_enabled = false; + } if (req.mode !== undefined) data.mode = req.mode; data.theme = req.theme || req.cookies?.theme || cfg.websrv.theme || 'f0ck'; if (!data.url) data.url = req.url; -- 2.50.1 From 6a5244598725f1c12dd552e71b2763b723a0973d Mon Sep 17 00:00:00 2001 From: Kibi Kelburton Date: Mon, 27 Jul 2026 12:28:06 +0200 Subject: [PATCH 2/2] custom location for CF Gate and removing box-shadow --- public/s/css/f0ckm.css | 1 - src/index.mjs | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/public/s/css/f0ckm.css b/public/s/css/f0ckm.css index 284cacd..15c8447 100644 --- a/public/s/css/f0ckm.css +++ b/public/s/css/f0ckm.css @@ -4642,7 +4642,6 @@ body.layout-modern.sidebar-right-hidden .pagination-container-fluid { -webkit-backdrop-filter: blur(12px); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 8px; - box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4); padding: 2px; max-width: fit-content; } diff --git a/src/index.mjs b/src/index.mjs index bf9dcf7..9467fb6 100644 --- a/src/index.mjs +++ b/src/index.mjs @@ -49,7 +49,7 @@ const gateOptions = { }, cloudflare_status: { status: 'ok', - location: 'Frankfurt', + location: cfg.websrv.private_society_gate_location || 'Frankfurt', name: 'Cloudflare', status_text: 'Working', }, @@ -1340,6 +1340,7 @@ process.on('uncaughtException', err => { show_mime_picker: cfg.websrv.show_mime_picker !== false, private_society: cfg.websrv.private_society || false, private_society_gate: cfg.websrv.private_society_gate || '', + private_society_gate_location: cfg.websrv.private_society_gate_location || 'Frankfurt', show_content_warning: cfg.websrv.show_content_warning !== false, web_url_upload: !!cfg.websrv.web_url_upload, enable_youtube_upload: cfg.websrv.enable_youtube_upload !== false, -- 2.50.1