mirror of
https://github.com/pockethost/pockethost.git
synced 2025-11-23 22:15:49 +00:00
mothership: fix security issue allowing users to update their own user records
This commit is contained in:
parent
2b51452491
commit
afbea72cc6
@ -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)
|
||||
})
|
||||
Loading…
x
Reference in New Issue
Block a user