Skip to content

History of commits

4473 commits

feat(security): enforce the CSRF check and drop the Csrf validation rule

The check is on: a request with an unsafe method and no valid token is answered 403 (JSON for XHR). The observation flag is gone with it. The 46 validator calls whose whole ruleset was ['csrf_token' => ['Csrf']] are removed together with the isCsrfValid() wrappers and the now-unused $request parameters; the mixed rulesets lose their csrf_token entry. Flood and Ban move from csrf_token, which was only ever their carrier, to the reserved _form key, and the 12 errors.csrf_token blocks in the templates become errors._form.
simba77 10 აგვ 2026 21:18 Branch: 10.x 1a6a703

feat(security): check the CSRF token in the pipeline, in observation mode

CsrfMiddleware runs after TrimStringsMiddleware and before the middlewares of the route, so a forged request never reaches the logic of a module. The token is read from the csrf_token field or the X-CSRF-Token header; a failure is answered 403, negotiated as JSON for XHR because the Vue components read response.data.message. Ships with enforce = false in config/csrf.php: a failure is only logged and the request is served, so a form that still misses the token surfaces in the log instead of in support. The flag goes away when the check is turned on.
simba77 10 აგვ 2026 20:58 Branch: 10.x 40f3304

feat(router): add the CSRF exemption mechanics

Route::withoutCsrf() and RouteCollection::withoutCsrf() mark a route, a collection or a group as exempt; the flag travels as a route default and reaches the kernel as RouteMatchResult::$csrfExempt. config/csrf.php holds path patterns for the entry points whose routes are not ours to edit. Nothing reads the flag yet — the middleware follows.
simba77 10 აგვ 2026 20:51 Branch: 10.x 7ebd236

fix(security): add CSRF tokens to all POST forms

60 POST forms in 58 templates had no csrf_token field, among them login, registration, password restore and the whole downloads, library, mail and album modules. Adds the hidden field to every one of them, a csrf-token meta tag to both layouts and an X-CSRF-Token axios default in both globals.js so JSON requests can carry the token too. Behaviour is unchanged until the CSRF middleware is enabled.
simba77 10 აგვ 2026 20:45 Branch: 10.x 4cb00ae

chore: drop unused laminas packages

laminas-servicemanager and laminas-uri were required directly but never used in code; laminas-escaper leaves as a transitive dependency of laminas-uri.
simba77 10 აგვ 2026 20:45 Branch: 10.x 7cdb5b9

chore: delete the plans of finished refactorings

The admin, album, collections, profile and pagination migrations are done, and the guestbook analysis records its own completion. Nothing in these documents is still open, so they have nothing left to track.
simba77 9 აგვ 2026 20:58 Branch: 10.x acce9f2

docs: update the documentation submodule

Two pages of the guide: the module creation walkthrough no longer wires the translation domain from a controller constructor, and the theme build entries are declared in the theme manifest rather than in vite.config.js.
simba77 9 აგვ 2026 20:40 Branch: 10.x 716b03b