Skip to content

Commit

Permalink
chore: add gif to admitted images (#1896)
Browse files Browse the repository at this point in the history
* chore: add gif to admitted images

* chore: disable linked wearables proposals submission (#1897)
  • Loading branch information
1emu authored Dec 26, 2024
1 parent 920d733 commit fe405f2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/routes/proposal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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<NewProposalLinkedWearables>(newProposalLinkedWearablesValidator, req.body || {})

Expand Down
2 changes: 1 addition & 1 deletion src/utils/validations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 })
Expand Down

0 comments on commit fe405f2

Please sign in to comment.