mothership: fix security issue allowing users to update their own user records

This commit is contained in:
Ben Allfree 2025-09-11 15:22:10 +00:00
parent 2b51452491
commit afbea72cc6

View File

@ -0,0 +1,16 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("systemprofiles0")
collection.updateRule = null
return dao.saveCollection(collection)
}, (db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("systemprofiles0")
collection.updateRule = "id = @request.auth.id"
return dao.saveCollection(collection)
})