mapbox / mapbox/mapbox-gl-js

Validate that metadata only contains valid JSON

Open
#4,132 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

api :memo:
Dominant language
TypeScript
Stars
12.4k
Forks
2.4k
PR merge metrics
No merged PRs in 30d

Description

_From @lucaswoj on October 13, 2016 18:59_

When a style is validated in GL JS, functions embedded in the metadata are tolerated during validation but cause an error when the style is transferred to the worker. We should validate that metadata only contains valid JSON, no functions or complex objects.

ref https://github.com/mapbox/mapbox-gl-js/issues/3360#event-822052810

_Copied from original issue: mapbox/mapbox-gl-style-spec#536_

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

Start by tracing GL JS style validation and the metadata path used before transfer to the worker. Reproduce the case where metadata contains a function or complex object, then verify that validation rejects anything that is not valid JSON.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
frontend, testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.