From fe21696f6cbf8801040f0729718221935b0ff4d9 Mon Sep 17 00:00:00 2001 From: Devin Ivy Date: Thu, 14 Dec 2023 17:25:28 -0500 Subject: [PATCH] ensure entryway plc rotation key --- packages/pds/src/api/com/atproto/server/createAccount.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/pds/src/api/com/atproto/server/createAccount.ts b/packages/pds/src/api/com/atproto/server/createAccount.ts index adfdab3b0f8..059b864a1ed 100644 --- a/packages/pds/src/api/com/atproto/server/createAccount.ts +++ b/packages/pds/src/api/com/atproto/server/createAccount.ts @@ -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)