Skip to content
This repository was archived by the owner on May 29, 2026. It is now read-only.

fix(security): wave-3 critical fixes#97

Merged
rubenvdlinde merged 1 commit into
developmentfrom
fix/wave3-critical-findings
May 28, 2026
Merged

fix(security): wave-3 critical fixes#97
rubenvdlinde merged 1 commit into
developmentfrom
fix/wave3-critical-findings

Conversation

@rubenvdlinde

Copy link
Copy Markdown
Contributor

Summary

Fixes wave-3 CRITICAL findings from /tmp/triage-nldesign-nctemplate.md.

TC1 (false-positive doc fix) — Fix misleading MetricsController comment

The @NoCSRFRequired docblock on MetricsController::index() incorrectly claimed the endpoint was protected by @AuthorizedAdminSetting (an attribute that was never applied). The endpoint IS admin-only by Nextcloud default — SecurityMiddleware enforces isAdminUser() when @NoAdminRequired is absent. Updated the comment to accurately explain the real enforcement mechanism.

TC2 — Fix canonical brand icons

All three brand icon files violated the fleet convention:

  • img/app.svg: fill="currentColor"fill="#fff" (was rendering as black silhouette in NC nav)
  • img/app-store.svg: replaced <rect rx="40"> (rounded rectangle) on NC blue #0082C9 with the canonical point-up hexagon on Conduction cobalt #21468B, removed overlapping stroke path
  • img/app-dark.svg: removed fill="white" → no fill attribute (correct: inherits currentColor)

Every app scaffolded from this template inherited the broken icons fleet-wide.

TC3 — Synchronise l10n key sets

l10n/en.json had 12 keys and l10n/nl.json had 29 keys with only 4 in common, violating the apps-must-support-nl+en policy. Built the union of all 43 keys used across Vue sources, PHP lib, and manifest strings. Both locale files now contain the complete key set with correct English values and Dutch translations.

Follow-up

A Hydra issue should be filed to add:

  1. Scaffold-time brand-icon lint gate (catches TC2 fleet-wide)
  2. i18n-parity CI gate (checks en/nl share identical key sets, catches TC3 fleet-wide)

Test plan

  • app.svg: renders as white glyph in NC nav (not black silhouette)
  • app-store.svg: displays point-up hexagon with cobalt background
  • app-dark.svg: glyph inherits theme colour correctly
  • l10n/en.json and l10n/nl.json key sets are identical
  • MetricsController comment accurately describes admin enforcement
  • CI gates green

🤖 Generated with Claude Code

…ics comment

TC1 (false-positive doc fix): Remove misleading @AuthorizedAdminSetting claim
from MetricsController docblock. The endpoint IS admin-only by NC default
(SecurityMiddleware enforces isAdminUser() when @NoAdminRequired is absent);
the comment wrongly cited an attribute that was not applied.

TC2: Fix canonical brand icons (app.svg, app-dark.svg, app-store.svg).
- app.svg: fill="currentColor" -> fill="#fff" (was rendering as black silhouette)
- app-store.svg: replace <rect rx="40"> + NC blue #0082C9 with canonical
  point-up hexagon on Conduction cobalt #21468B, no overlapping strokes
- app-dark.svg: strip fill="white" -> no fill (inherits currentColor per convention)

TC3: Synchronise l10n/en.json and l10n/nl.json to a shared key-set union.
Previously en had 12 keys, nl had 29 keys, only 4 overlapping. Both files now
contain all 43 keys gathered from Vue sources + manifest + existing locale files,
with proper English values and Dutch translations throughout.

Fixes: /tmp/triage-nldesign-nctemplate.md TC1, TC2, TC3
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant