mapbox / mapbox/mapbox-gl-js

MapBox Studio fails to complain about "invalid" SVGs

Open
#13,331 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

auto-triaged bug :lady_beetle:
Dominant language
TypeScript
Stars
12.4k
Forks
2.4k
PR merge metrics
No merged PRs in 30d

Description

### Steps to Trigger Behavior

1. Upload an SVG containing `style` or other "invalid" markup to MapBox Studio

### Expected Behavior

1. Upload an SVG containing `style` or other "invalid" markup to MapBox Studio
2. Display an error informing the user that this image will not be usable
3. Observe the image not displaying within the MapBox Studio list

### Actual Behavior

1. Upload an SVG containing `style` or other "invalid" markup to MapBox Studio
2. Observe no errors
3. Observe no problems displaying within MapBox Studio
4. Observe not included in `https://api.mapbox.com/styles/v1/{username}/{styleid}`

No indication is given that there may have been a problem with this upload, leading to wasted time debugging endpoints, re-punishing, clearing caches and the like before realising it's that the SVG isn't supported and no errors have been thrown to indicate this.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The report identifies SVG uploads in MapBox Studio and the styles API, but names no repository file, test, or entry point. First determine whether SVG validation is handled in this repository, then reproduce the upload and verify that unsupported markup produces a visible error and is not silently omitted.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.