v1.9.4
·
2 commits
to main
since this release
Immutable
release. Only release title and notes can be modified.
Auth fixes for fresh installations
This release fixes four auth bugs that every new project scaffolded from this template inherited, and upgrades the framework to baseapi/baseapi v1.9.4.
Fixed
- Session login never persisted.
LoginController/SignupControllerwrote$this->request->session['user_id']— a by-value copy of$_SESSIONthat PHP never persists — so a successful login was silently dropped on the very next request. They now write$_SESSIONdirectly. - Login crashed on an unknown email.
User::firstWhere()returnsnullfor an unknown email, andcheckPassword()was called on it, causing a fatal null-method error instead of a401. Now guarded withinstanceof User. - Password hash leaked in responses.
BaseModel::jsonSerialize()serializes every public property, including the bcryptpassword— exposed in login/signup/me responses and the$request->userpayload.Usernow overridesjsonSerialize()to strip it. /merejected API-token auth.MeControllerread$_SESSIONonly, returning401for validBearertoken requests (the SPA path). It now reads$request->userset byCombinedAuthMiddleware, working for both session and token auth.
Changed
- Upgraded
baseapi/baseapiv1.9.0→v1.9.4.
Known issue
- The bundled example/health Feature tests assume a
{ data }response envelope while the template shipsresponse.wrap_data=false. These failures are pre-existing and unrelated to this release.