Public bug reported:

[ Impact ]

The Rspamd 3.8.1 WebUI shipped in Ubuntu 24.04 LTS has non-functional
Bootstrap controls. Navigation tabs and dropdown/menu controls change
the URL hash but do not activate the requested pane, making substantial
parts of the administrative interface unusable.

The upstream Rspamd 3.8.1 interface is written for Bootstrap 5. Its HTML
and JavaScript use data-bs-toggle/data-bs-target and Bootstrap 5 events.
Ubuntu's packaging removes the bundled Bootstrap 5 assets, depends on
libjs-bootstrap4, and debian/postinst copies Bootstrap 4.6.1 into the
WebUI paths. The resulting Bootstrap 5 markup/Bootstrap 4 runtime
mismatch causes the failure.

A minimal fix is to replace the libjs-bootstrap4 dependency with libjs-
bootstrap5 and update the two debian/postinst source paths from
/usr/share/javascript/bootstrap4/ to /usr/share/javascript/bootstrap5/.
libjs-bootstrap5 5.3.1+dfsg-1 is already available in Noble and provides
the expected paths.

Debian has independently made this same packaging correction in newer
rspamd packaging: its changelog for 3.11.0-1 says "Replace libjs-
bootstrap4 by libjs-bootstrap5", and postinst copies the bootstrap5
assets.

[ Test Plan ]

Reproduction on an otherwise normally configured Ubuntu Noble host:

1. Install rspamd 3.8.1-1ubuntu3 and enable access to its controller WebUI.
2. Open the Rspamd WebUI.
3. Click History, Configuration, or another Bootstrap-driven navigation tab.
4. Observe that the URL hash may change but the selected pane does not 
activate; dropdown/menu controls are likewise inert.
5. Confirm the mismatch:
   - /usr/share/rspamd/www/index.html and js/app/rspamd.js contain 
data-bs-toggle.
   - /usr/share/rspamd/www/js/lib/bootstrap.bundle.min.js identifies itself as 
Bootstrap 4.6.1.

Verification with the proposed package:

1. Upgrade rspamd from noble-proposed with no reverse-proxy content rewriting.
2. Confirm /usr/share/rspamd/www/js/lib/bootstrap.bundle.min.js and 
css/bootstrap.min.css were copied from /usr/share/javascript/bootstrap5/ and 
identify as Bootstrap 5.
3. Reload the WebUI without cache and verify every navigation tab and 
dropdown/menu control works.
4. Restart rspamd and reinstall/reconfigure the package; verify the Bootstrap 5 
files remain present and the WebUI remains functional.
5. Verify rspamd scanning and controller API operations still work.

[ Where problems could occur ]

The change affects only the packaged static Bootstrap dependency and the
paths used by rspamd's postinst to copy those assets. If the dependency
or paths were wrong, package configuration could fail or the WebUI could
lose styling and controls. Noble's libjs-bootstrap5 package was checked
and provides:

/usr/share/javascript/bootstrap5/js/bootstrap.bundle.min.js
/usr/share/javascript/bootstrap5/css/bootstrap.min.css

Bootstrap 5 may render minor styling details differently from Bootstrap
4, but it is the version expected by this upstream WebUI and supplied in
the original Rspamd 3.8.1 source.

[ Other Info ]

Observed environment:

Ubuntu 24.04.4 LTS
rspamd 3.8.1-1ubuntu3
libjs-bootstrap4 4.6.1+dfsg1-4+deb12u1build0.24.04.1
libjs-bootstrap5 candidate 5.3.1+dfsg-1

Upstream Rspamd 3.8.1 bundles Bootstrap 5.3.2 before Debian/Ubuntu's
drop-system-JavaScript patch removes it. A local reverse-proxy response
rewrite from data-bs-* to data-* restores navigation, further confirming
the version mismatch, but that is only a workaround and does not repair
all Bootstrap 5 behavior.

** Affects: rspamd (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2166731

Title:
  [noble] Rspamd WebUI controls are broken because package substitutes
  Bootstrap 4 for Bootstrap 5 assets

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/rspamd/+bug/2166731/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to