packagist damienharper/auditor-bundle 7.3.1

3 hours ago

🔒 Security

Viewer routes registered outside the auditor route loader

Advisory: GHSA-cqq8-4jc5-5p42

Since 7.0.0, the viewer controller was autoconfigured. Symfony tags every autoconfigured class
carrying #[Route] as a routing controller, and the routing.controllers resource of the symfony/routing recipe
(config/routes.yaml) loads those classes on its own. The viewer routes were then registered outside the bundle's
auditor route loader:

  • with the default layout, where config/routes.yaml is imported last, they answered at /audit whatever the prefix
    of the application's import (e.g. /admin), so an access_control rule written for the prefixed path
    (^/admin/audit) did not protect them;
  • they were registered even with the viewer disabled (viewer: false).

The controller is now registered with the explicit controller.service_arguments tag, without autoconfiguration:
the viewer routes come from the auditor loader only, under the prefix of its import, and a disabled viewer
registers no route.

All users of the 7.x line are encouraged to upgrade. Applications that do not import routing.controllers, or
that protect /audit itself (or the whole application) with a firewall or an access_control rule requiring
authentication, were not exposed. Entities restricted with #[Security(view: [...])] (or the roles option)
stayed denied to anonymous visitors since 7.2.2.

Reported by @craigh in #625, fixed in #719.


⚠️ Upgrade notes

The viewer moves back under the prefix of your import

If your application imports the bundle routes with a prefix and also imports routing.controllers, the viewer
moves from /audit to the prefixed path (e.g. /admin/audit): adapt your access_control rules and links.

If your application only got the viewer through routing.controllers, without importing the bundle routes, it no
longer has a viewer: import them (config/routes/dh_auditor.yaml):

dh_auditor:
    resource: "@DHAuditorBundle/Controller/"
    type: auditor

See UPGRADE-7.0.md.


What's Changed

Security

Bug fixes

  • fix(console): restore the user provider set before a command when it ends by @DamienHarper in #688 (backport of #687)

Documentation

  • docs: point readers and agents to the right package in the README and Composer metadata by @DamienHarper in #691

References

Full Changelog: 7.3.0...7.3.1

Don't miss a new auditor-bundle release

NewReleases is sending notifications on new releases.