Zum Hauptinhalt springen
LIVE
CVSS 6.9CVE-2026-137403 | A vulnerability was determined in SourceCodester Online Food Ordering System 1.0. This affects an unknown function of the file /admin/update_food.php. Executing a manipulation of the argument price can lead to sql injection. The attack can be launched remotely. The exploit has been publicly disclosed and may be utilized.CVSS 8.2CVE-2026-137583 | Juspay Hyperswitch 1.8.0 before 1.129.0 uses a hardcoded default webhook secret that allows unauthenticated attackers to forge Stripe webhooks when no merchant webhook secret is configured. Attackers knowing a merchant ID and connector transaction ID can sign a crafted payment_intent.succeeded event with "default_secret" to mark uncaptured payments as succeeded.CVSS 9.1CVE-2026-137584 | Twenty through 2.63.0 in multi-workspace mode contains an authentication bypass vulnerability that allows unauthenticated attackers to obtain pending invitation tokens by registering an invitee's email via the signUp GraphQL mutation. Attackers can submit the leaked personalInviteToken to signUpInWorkspace to join the workspace with the invitation's role, including Admin, and obtain a verified email.CVSS 8.7CVE-2026-137585 | Bazarr 1.4.4 before 1.6.1-beta.29 on Windows contains an unauthenticated path traversal vulnerability in the catch_all() handler in bazarr/app/ui.py. Attackers can append percent-encoded '..' segments after the 'workbox-' prefix to read files like config.yaml containing stored API keys and credentials.CVSS 8.7CVE-2026-137586 | LibreChat 0.7.3 before 0.8.9 contains an improper input type validation vulnerability in the requireLdapAuth middleware of the /api/auth/login route that allows unauthenticated attackers to crash the server. Attackers can send a JSON login request with an existing directory user's email and a non-string password, triggering an ldapjs assertion error that terminates the Node.js process.CVSS 9.3CVE-2026-130637 | SEPPMAIL Secure E-Mail Gateway versions before 15.1.2 are affected by a pre-authentication server-side template injection vulnerability that allows unauthenticated remote attackers to disclose sensitive account information and reset account passwords, potentially enabling account takeover.CVSS 5.3CVE-2026-137594 | MISP contains an authorization flaw in the SharingGroup model's checkIfAuthorisedExtend method. The method grants sync users (those with the perm_sync role) an exemption from the extend flag requirement when modifying sharing group membership. However, this exemption was applied unconditionally to all sharing groups, including those created locally on the instance (local = 1). The intended behavior, consistent with the sync push path, is that the exemption sCVSS 8.7CVE-2026-137566 | Argo Workflows 3.0.0 through 3.7.18, 4.0.0 before 4.0.12, and 4.1.0 before 4.1.4 contains a path traversal vulnerability in the S3, GCS, and Azure Blob artifact drivers. Attackers who can write bucket objects or supply malicious artifact sources can use object keys containing ../ sequences to write arbitrary files in the executor pod, achieving code execution.
Alle im Drawer
Intelligence View
⚡ tsecurity.de Intelligence

1С-Битрикс: кастомная страница настроек темы через Option API

1С-Битрикс: кастомная страница настроек темы через Option API Задача: сделать свою страницу настроек темы и сохранить параметры так, чтобы они стабильно применя…

Beitrag
0
Seite
0
↗ Quelle (dev.to)
Quelle & Fakten · 3 Min. Lesezeit
Quelle: dev.to
Rubrik: Secure Programming




1С-Битрикс: кастомная страница настроек темы через Option API



Задача: сделать свою страницу настроек темы и сохранить параметры так, чтобы они стабильно применялись в шаблоне сайта. В новой документации Битрикс для этой задачи есть все базовые элементы: работа с административной панелью, API опций модуля и стандартная защита формы от CSRF.



Официальные источники:








В чем проблема



Частая ситуация: параметры темы хранят в файлах или случайных таблицах, а затем сложно понять, где именно меняется цвет, телефон, логотип или поведение блока. В итоге:




  • нет единой точки хранения;

  • настройки меняются небезопасно;

  • после обновлений или миграций часть параметров теряется;

  • сложно проверить, что именно применилось на фронте.



Для устойчивой схемы в Битрикс достаточно:




  • хранить настройки в Option;

  • отправлять форму только с CSRF-токеном;

  • читать настройки в шаблоне сайта в одном месте.






Рабочее решение



Ниже минимальный рабочий сценарий без недокументированных зависимостей.






Шаг 1. Добавляем кнопку открытия страницы настройки



Документация по панели администрирования показывает, что можно добавить свою кнопку через AddPanelButton.




<?php
// Например, в шаблоне после подключения пролога
$APPLICATION->AddPanelButton([
"ID" => "theme_settings",
"TEXT" => "Настройки темы",
"TYPE" => "BIG",
"SORT" => 100,
"HREF" => "/local/admin/theme_settings.php",
]);






API:





Если хотите открыть страницу в popup, используйте GetPopupLink:



https://docs.1c-bitrix.ru/api/classes/CAllMain.html#method\_GetPopupLink






Шаг 2. Делаем форму с CSRF-токеном



В новой документации по безопасности явно указаны bitrixsessidpost() и checkbitrixsessid().




<?php
require($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_before.php");
use Bitrix\Main\Config\Option;
$moduleId = "main";
if ($_SERVER["REQUEST_METHOD"] === "POST") {
if (!check_bitrix_sessid()) {
die("Invalid session");
}
$phone = trim((string)($_POST["theme_phone"] ?? ""));
$accent = trim((string)($_POST["theme_accent"] ?? ""));
Option::set($moduleId, "theme_phone", $phone);
Option::set($moduleId, "theme_accent", $accent);
}
$savedPhone = Option::get($moduleId, "theme_phone", "");
$savedAccent = Option::get($moduleId, "theme_accent", "#0a7c66");
?>
<form method="post">
<?= bitrix_sessid_post(); ?>
<label>Телефон в шапке</label><br>
<input type="text" name="theme_phone" value="<?= htmlspecialchars($savedPhone, ENT_QUOTES, "UTF-8"); ?>"><br><br>
<label>Акцентный цвет</label><br>
<input type="text" name="theme_accent" value="<?= htmlspecialchars($savedAccent, ENT_QUOTES, "UTF-8"); ?>"><br><br>
<button type="submit">Сохранить</button>
</form>






Документация:








Шаг 3. Читаем настройки в шаблоне темы



Дальше используем те же ключи Option в шаблоне:




<?php
use Bitrix\Main\Config\Option;
$moduleId = "main";
$themePhone = Option::get($moduleId, "theme_phone", "+7 (000) 000-00-00");
$themeAccent = Option::get($moduleId, "theme_accent", "#0a7c66");
?>
<style>
:root { --theme-accent: <?= htmlspecialchars($themeAccent, ENT_QUOTES, "UTF-8"); ?>; }
</style>
<a href="tel:<?= htmlspecialchars($themePhone, ENT_QUOTES, "UTF-8"); ?>">
<?= htmlspecialchars($themePhone, ENT_QUOTES, "UTF-8"); ?>
</a>






Идея простая: одна точка сохранения и одна точка чтения. Это упрощает поддержку и перенос.






Проверка результата



Проверяем по шагам:




  1. Открыть страницу настроек через кнопку панели.

  2. Сохранить значения.

  3. Обновить публичную страницу и убедиться, что новые данные применились.



Быстрая проверка из HTML:




curl -s https://example.ru/ | grep -E "theme-accent|tel:"






Ожидаемый признак: в ответе видны обновленные значения цвета и телефона.






Типичные ошибки



❌ Ошибка: сохраняют POST без проверки токена.



Причина: нет checkbitrixsessid().



Как исправить: добавить проверку и bitrixsessidpost() в форму.



❌ Ошибка: ключи в Option::set() и Option::get() не совпадают.



Причина: опечатки вроде themephone vs themetel.



Как исправить: вынести ключи в константы или использовать одинаковые литералы.



❌ Ошибка: выводят значение без экранирования.



Причина: прямой вывод пользовательского текста в HTML.



Как исправить: использовать htmlspecialchars(..., ENT_QUOTES, "UTF-8").



❌ Ошибка: ожидают, что кнопка панели появится для всех пользователей.



Причина: права и настройки панели зависят от пользователя/группы.



Как исправить: проверить доступы и настройки панели администрирования:



https://docs.1c-bitrix.ru/pages/cms-basics/admin-panel.html






Где применять




  • В темах, где нужно управлять контактами, цветами и переключателями блоков.

  • В проектах с контент-редакторами, которым нужен простой интерфейс без правок кода.

  • В production, где важно централизованное хранение параметров.



Дополнительно по структуре проекта:





Read more on Viku-Lov Studio

Information ergänzen Fachhinweis, Update, Korrektur oder Quelle zur Meldung beitragen
Gäste-Hinweise werden kurz redaktionell geprüft und danach hier angezeigt.

Community-Hinweise zur Meldung

0 freigegeben
Social ReaktionenReagiere als Erste:r — dein Feedback zählt!
Informations-Bewertung:

💬 Community discussion & comments

🌐 Join the main chat

Start the discussion in the Social Chat broadcast stream or submit an expert contribution via the supplement form above.

Community Rating &amp; Social Proof
⭐ Reader Rating
–
Ø / 5.0
No reader ratings yet
Was this article helpful?
0
Submit your rating
Detailed rating (optional)
Content & Quality
Source & Credibility
Freshness
Security Briefing Free · 1-Click Unsubscribe

Intelligence Digest — free

The top security news daily · unsubscribe anytime

Related story clusters & sources (vector AI)

6 Cluster
Similar posts
🔍 Verwandte News

Auch interessante Nachrichten 1С-Битрикс: кастомная страница настроек темы через Option API

Thematisch verwandte Begriffe: 1СБитрикс, кастомная, страница, настроек · 6 Treffer

Laden...

Loading videos ...

Laden...

Loading posts ...

Laden...

Loading videos ...

Laden...

Loading posts ...

Laden...

Loading videos ...

Laden...

Loading posts ...

Laden...

Loading videos ...

Laden...

Loading posts ...

Laden...

Loading videos ...

💬 Loading comments…
Pull to refresh
Widgets & Topics
Loading widgets…
Nächster Beitrag