.pmtiles files can be any unicode char but aws/cloudflare only accept S3 safe characters

Aperta
#490 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

@yulman2207 ci sta già lavorando.

Dal 19/10/2026.

  • #680 di @yulman2207 — aperta

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
go, typescript
Ambito
backend, cloud

Direzione di ricerca

Start with the regex in serverless/shared/index.ts and the handler around pmtiles/server.go:441, then trace how AWS, Cloudflare, GCP, and Azure implementations derive object-storage keys from URLs. Confirm the behavior for the Unicode filename example and define handling that accepts valid URL characters while rejecting path traversal; done means all affected proxies resolve such keys safely instead of returning 404.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug

In the AWS and Cloudflare proxy implementations we use a regex to parse the URL to a object storage key https://github.com/protomaps/PMTiles/blob/main/serverless/shared/index.ts#L8

This only allows S3-safelisted characters https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html

But this means that if I have a valid but non safe listed filename我的城市.pmtiles in s3, then I put the lambda proxy in front, it will not work, it will return 404.

We should accept any character in URLs but be careful to avoid path traversal attacks, etc.

This also affects go-pmtiles and thus the GCP and Azure implementations: https://github.com/protomaps/go-pmtiles/blob/main/pmtiles/server.go#L441

Lingua principale
TypeScript
Stelle
3.3k
Fork
218
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di protomaps/PMTiles

Tutte le issue di protomaps/PMTiles

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.