]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Minor] Expose Errors history to read-only mode 6156/head
authorAlexander Moisseev <moiseev@mezonplus.ru>
Mon, 27 Jul 2026 10:42:20 +0000 (13:42 +0300)
committerAlexander Moisseev <moiseev@mezonplus.ru>
Mon, 27 Jul 2026 10:42:20 +0000 (13:42 +0300)
The /errors endpoint and its WebUI table were gated behind the
enable (privileged) password. Lower the privilege check so any
authenticated user can view them.

This is safe: the endpoint returns only Rspamd's internal
operational error log (timestamp, pid, level, module, message) —
no email content, PII, or secrets — and read-only users already
see strictly more sensitive data in the History tab (sender/
recipient IPs, scores, symbols). Authentication remains required
and the endpoint is purely informational (no mutation).

interface/index.html
interface/js/app/history.js
src/controller.c

index 01943e410da15496fe087b46939c829db4dd478e..6d5b3eb8f376f0fbe9810a6a2f9ea77d05ff3e1d 100644 (file)
                                                </div>
                                        </div>
                                </div>
-                               <div class="card shadow my-3 ro-hide" id="errors-history">
+                               <div class="card shadow my-3" id="errors-history">
                                        <div class="card-header text-secondary py-1 d-flex align-items-center">
                                                <span class="icon me-3"><i class="fas fa-exclamation-triangle"></i></span>
                                                <span class="h6 fw-bolder my-auto ms-0">Errors</span>
index c5b90519ddd727e1203fd21ee621266849194931..1e2e5051fbf24fc7a7819e3e5bce2be25ff62f8d 100644 (file)
@@ -293,8 +293,6 @@ define(["app/common", "app/libft", "app/tab-utils", "tabulator"],
         }
 
         ui.getErrors = function () {
-            if (common.read_only) return;
-
             common.query("errors", {
                 success: function (data) {
                     const neighbours_data = data
index 9b2081495f9042ecabe757a7e2acd8ce9d4b039d..8381c87acd6f47d185dae6ab3fdb42f0bbf45575 100644 (file)
@@ -1767,7 +1767,7 @@ rspamd_controller_handle_errors(struct rspamd_http_connection_entry *conn_ent,
 
        ctx = session->ctx;
 
-       if (!rspamd_controller_check_password(conn_ent, session, msg, TRUE)) {
+       if (!rspamd_controller_check_password(conn_ent, session, msg, FALSE)) {
                return 0;
        }