Skip to content

Commit

Permalink
ensure entryway plc rotation key
Browse files Browse the repository at this point in the history
  • Loading branch information
devinivy committed Dec 14, 2023
1 parent 2012796 commit fe21696
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/pds/src/api/com/atproto/server/createAccount.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,12 @@ const validateInputsForEntrywayPds = async (
'IncompatibleDidDoc',
)
}
await plc.assureValidOp(plcOp)
try {
await plc.assureValidOp(plcOp)
await plc.assureValidSig([plcRotationKey], plcOp)
} catch (err) {
throw new InvalidRequestError('invalid plc operation', 'IncompatibleDidDoc')
}
const doc = plc.formatDidDoc({ did, ...plcOp })
const data = ensureAtpDocument(doc)

Expand Down

0 comments on commit fe21696

Please sign in to comment.