Skip to content

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

Merged
rubenvdlinde merged 1 commit into
mainfrom
fix/wave3-critical-security
May 28, 2026
Merged

fix(security): wave-3 critical fixes#365
rubenvdlinde merged 1 commit into
mainfrom
fix/wave3-critical-security

Conversation

@rubenvdlinde

Copy link
Copy Markdown
Contributor

Summary

Fixes remaining wave-3 CRITICAL findings from /tmp/triage-softwarecatalog.md that were still present on main. The development branch had all 7 bugs; main has already resolved C2/C4/C5/C6/C7 via prior commits.

  • C1 ContactpersonenController::updateUserGroups — Add admin/org-admin gate ($this->groupManager->isAdmin() + gebruik-beheerder/aanbod-beheerder group check). The method was @NoAdminRequired with no auth check at all — any authenticated user could grant themselves or others write-tier catalog groups (privilege escalation).
  • C3 SettingsService::determineOrganisationType — Fix strtolower($organisation->getName() === true) type-coercion bug. The === true comparison turns the string name into a boolean (false), which strtolower coerces to '', making strpos never match — all organisations were classified as Leverancier regardless of name.

Changes C2/C4/C5/C6/C7 are already resolved on main and were not re-applied.

development branch also received all 7 fixes at commit 91bf0e4.

Test plan

  • PHPStan: no new errors introduced (17 errors pre and post fix)
  • C1: Log in as non-admin/non-org-admin; PATCH /contactpersonen/{username}/groups returns 403
  • C1: Log in as gebruik-beheerder group member; group update succeeds
  • C3: Sync an organisation with "gemeente" in the name; determineOrganisationType returns 'Gemeente' (not 'Leverancier')

C1: ContactpersonenController::updateUserGroups — add admin/org-admin gate; any authed user could previously self-assign write-tier groups (privilege escalation)
C3: SettingsService::determineOrganisationType — fix strtolower(getName() === true) type-coercion bug that returned empty string, causing all orgs to be typed as Leverancier

Other C2/C4/C5/C6/C7 findings were already resolved in main prior to this commit.
@rubenvdlinde
rubenvdlinde merged commit 676f332 into main May 28, 2026
@rubenvdlinde
rubenvdlinde deleted the fix/wave3-critical-security branch May 28, 2026 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant