diff --git a/src/routes/proposal.ts b/src/routes/proposal.ts index 9daa7317a..aa4b68635 100644 --- a/src/routes/proposal.ts +++ b/src/routes/proposal.ts @@ -94,6 +94,7 @@ import { const PITCH_PROPOSAL_SUBMIT_ENABLED = false const GRANT_PROPOSAL_SUBMIT_ENABLED = false +const LINKED_WEARABLES_PROPOSAL_SUBMIT_ENABLED = false export default routes((route) => { const withAuth = auth() @@ -397,6 +398,10 @@ export async function createProposalGrant(req: WithAuth) { const newProposalLinkedWearablesValidator = schema.compile(newProposalLinkedWearablesScheme) export async function createProposalLinkedWearables(req: WithAuth) { + if (!LINKED_WEARABLES_PROPOSAL_SUBMIT_ENABLED) { + throw new RequestError('Linked wearables proposal submission is not enabled', RequestError.Forbidden) + } + const user = req.auth! const configuration = validate(newProposalLinkedWearablesValidator, req.body || {}) diff --git a/src/utils/validations.ts b/src/utils/validations.ts index a740e611d..27da62004 100644 --- a/src/utils/validations.ts +++ b/src/utils/validations.ts @@ -281,7 +281,7 @@ function isFromTrustedDomain(url: string): boolean { } export async function isValidImage(imageUrl: string) { - const allowedImageTypes = new Set(['image/bmp', 'image/jpeg', 'image/png', 'image/webp']) + const allowedImageTypes = new Set(['image/bmp', 'image/jpeg', 'image/png', 'image/webp', 'image/gif']) if (!isFromTrustedDomain(imageUrl)) { logger.error('Image not from trusted domain', { imageUrl })