Skip to content

v1.12.1 — UBI9 UTF-8 locale hotfix

Choose a tag to compare

@clem-field clem-field released this 18 Jul 12:36
49ad998

Hotfix — UTF-8 locale in the UBI9 image (#750)

Fixes the v1.12.0 regression where the UBI9 image returned HTTP 500 on all full-layout pages (including /login) when SPARC_HEADER_TEXT (the rules-of-behavior header) — or any operator env var rendered into a page, incl. the consent banner — contained non-ASCII characters.

  • Root cause: UBI9 minimal ships no UTF-8 locale → Ruby tags ENV[] values as BINARY (ASCII-8BIT) → rendering them into the UTF-8 layout raised Encoding::CompatibilityError. The prior Debian base set LANG=C.UTF-8 implicitly, masking it.
  • Fix: ENV LANG=C.UTF-8 / LC_ALL=C.UTF-8 in the image (both build stages) + a build-time guard asserting Encoding.default_external == UTF-8 so it can't silently regress.
  • No action needed on upgrade — non-ASCII SPARC_HEADER_TEXT / banner text renders correctly.
  • Also: digest-only base-image reference + Dockerfile lint cleanup (SonarQube docker:S6596 / S103).

Reproduced on the real v1.12.0 image (500) and validated fixed (200). Tracking: #750.

Full changelog: v1.12.0...v1.12.1