[Bug]: Topology functions do not require a trusted context for unimpersonated tokens

Aperta
#6,253 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
java
Ambito
authorization

Direzione di ricerca

Reproduce by calling getTokenVBL(getSelected) from a player client on a token the player does not own, as the report describes. Compare the topology lookup functions with the other token lookups, which already require a trusted context, and find where the check is missing. Done when an untrusted player is refused for unimpersonated tokens they do not own, while the GM and owners still succeed.

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

Descrizione

bug
Describe the Bug

The token topology functions (e.g., getTokenVBL()) allow getting the topology from another token by provide the token's ID. Unlike most other look ups, this does not require a trusted context, meaning any player get the information regardless of whether they own the token.

To Reproduce
  1. Start a new campaign, and start a server as a GM.
  2. Join the server with a player client.
  3. Drop a token on the map. Make sure it is not owned by the player, and add some VBL to it.
  4. On the GM client (host):
    • Select the token.
    • Get the token's VBL: [r: getTokenVBL(getSelected)]
    • This should rightfully succeed since GMs can do anything.
  5. On the player client:
    • Select the token.
    • Get the token's VBL: [r: getTokenVBL(getSelected)]
    • This will succeed despite the player not having necessary permissions..
Expected Behaviour

It should not be possible to get another unimpersonated token's topology from an untrusted context.

Screenshots

No response

MapTool Info

MapTool 1.18.8

Desktop

Linux 22.3

Additional Context

I believe this behaviour goes back a long ways, it's not new in 1.18.

Lingua principale
Java
Stelle
927
Fork
286
Merge medio
3g 17h
PR unite (30g)
94

Preparare l'ambiente

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 RPTools/maptool

Tutte le issue di RPTools/maptool

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.