1cf82d81a7
adminAuth populates req.admin, not req.user, so currentAdminId was always undefined in the /api/admin/picpeak/import handler. reinjectCurrentAdmin() then had no account to preserve and the admin_users table was fully replaced by the uploaded backup — a crafted .picpeak let any admin with backup.restore take over every admin account (critical). One-line fix: pass req.admin.id. Closes GHSA-qxfx-4493-4v8f and its duplicate GHSA-pjp6-jcrj-3cr5.