Skip to content
Snippets Groups Projects
Commit 8ab4a15e authored by justinw's avatar justinw
Browse files

allow active key signature for image upload

parent 875ccbc4
No related branches found
No related tags found
No related merge requests found
......@@ -125,9 +125,17 @@ export async function uploadHandler(ctx: KoaContext) {
throw new APIError({code: APIError.Code.InvalidSignature, cause})
}
const threshold = account.posting.weight_threshold
const thresholdPosting = account.posting.weight_threshold
for (const auth of account.posting.key_auths) {
if (auth[0] === publicKey && auth[1] >= threshold) {
if (auth[0] === publicKey && auth[1] >= thresholdPosting) {
validSignature = true
break
}
}
const thresholdActive = account.active.weight_threshold
for (const auth of account.active.key_auths) {
if (auth[0] === publicKey && auth[1] >= thresholdActive) {
validSignature = true
break
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment