From a844eb0cad34be81ff92d7a8e8b6cded9066ef5f Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 29 Jan 2025 04:57:26 +0000 Subject: [PATCH 1/5] Accessibility: Use different id values for options #1597 --- invidious/invidious.php | 8 ++++---- markdown/markdown.php | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/invidious/invidious.php b/invidious/invidious.php index 033ecce5..5fa2eca9 100644 --- a/invidious/invidious.php +++ b/invidious/invidious.php @@ -54,8 +54,8 @@ function invidious_settings(array &$data) $t = Renderer::getMarkupTemplate('settings.tpl', 'addon/invidious/'); $html = Renderer::replaceMacros($t, [ - '$enabled' => ['enabled', DI::l10n()->t('Replace Youtube links with links to an Invidious server'), $enabled, DI::l10n()->t('If enabled, Youtube links are replaced with the links to the specified Invidious server.')], - '$server' => ['server', DI::l10n()->t('Invidious server'), $server, DI::l10n()->t('See %s for a list of available Invidious servers.', 'https://api.invidious.io/')], + '$enabled' => ['invidious-enabled', DI::l10n()->t('Replace Youtube links with links to an Invidious server'), $enabled, DI::l10n()->t('If enabled, Youtube links are replaced with the links to the specified Invidious server.')], + '$server' => ['invidious-server', DI::l10n()->t('Invidious server'), $server, DI::l10n()->t('See %s for a list of available Invidious servers.', 'https://api.invidious.io/')], ]); $data = [ @@ -71,9 +71,9 @@ function invidious_settings_post(array &$b) return; } - DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'invidious', 'enabled', (bool)$_POST['enabled']); + DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'invidious', 'enabled', (bool)$_POST['invidious-enabled']); - $server = trim($_POST['server'], " \n\r\t\v\x00/"); + $server = trim($_POST['invidious-server'], " \n\r\t\v\x00/"); if ($server != DI::config()->get('invidious', 'server', INVIDIOUS_DEFAULT) && !empty($server)) { DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'invidious', 'server', $server); } else { diff --git a/markdown/markdown.php b/markdown/markdown.php index 6f459244..e73fe028 100644 --- a/markdown/markdown.php +++ b/markdown/markdown.php @@ -27,7 +27,7 @@ function markdown_addon_settings(array &$data) $t = Renderer::getMarkupTemplate('settings.tpl', 'addon/markdown/'); $html = Renderer::replaceMacros($t, [ - '$enabled' => ['enabled', DI::l10n()->t('Enable Markdown parsing'), $enabled, DI::l10n()->t('If enabled, adds Markdown support to the Compose Post form.')], + '$enabled' => ['markdown-enabled', DI::l10n()->t('Enable Markdown parsing'), $enabled, DI::l10n()->t('If enabled, adds Markdown support to the Compose Post form.')], ]); $data = [ @@ -43,7 +43,7 @@ function markdown_addon_settings_post(array &$b) return; } - DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'markdown', 'enabled', intval($_POST['enabled'])); + DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'markdown', 'enabled', intval($_POST['markdown-enabled'])); } function markdown_post_local_start(&$request) { From 99f26dc3cce4200fd91576caf06411060a145579 Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 29 Jan 2025 04:58:04 +0000 Subject: [PATCH 2/5] Issue 14692: Avoid loop situation #1595 --- blockbot/blockbot.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blockbot/blockbot.php b/blockbot/blockbot.php index 022f188d..8f56a553 100644 --- a/blockbot/blockbot.php +++ b/blockbot/blockbot.php @@ -209,7 +209,7 @@ function blockbot_log_activitypub(string $url, string $agent) blockbot_save('activitypub-inbox-agents', $agent); } - if (!empty($_SERVER['HTTP_SIGNATURE']) && !empty(HTTPSignature::getSigner('', $_SERVER))) { + if (!empty($_SERVER['HTTP_SIGNATURE']) && !empty(HTTPSignature::getSigner('', $_SERVER, false))) { blockbot_save('activitypub-signature-agents', $agent); } } From a37f313990ff363d064f1618f5eed9004ab371ce Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 16 Feb 2025 05:50:12 +0000 Subject: [PATCH 3/5] Improve accessibility with showmore and rendertime #1600 --- rendertime/rendertime.php | 6 +++--- showmore_dyn/showmore_dyn.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/rendertime/rendertime.php b/rendertime/rendertime.php index 731cf003..82bac955 100644 --- a/rendertime/rendertime.php +++ b/rendertime/rendertime.php @@ -60,7 +60,7 @@ function rendertime_page_end(string &$o) if (DI::userSession()->isSiteAdmin() && (($_GET['mode'] ?? '') != 'minimal') && !DI::mode()->isMobile() && !DI::mode()->isMobile() && !$ignored) { - $o = $o . '
' . DI::l10n()->t("Database: %s/%s, Network: %s, Rendering: %s, Session: %s, I/O: %s, Other: %s, Total: %s", + $o = $o . '