master #32

Merged
kibi merged 2 commits from master into 98 2026-07-27 10:28:47 +00:00
2 changed files with 6 additions and 2 deletions
Showing only changes of commit 63c39ebe90 - Show all commits

View File

@@ -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 {

View File

@@ -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;