MJ: Record Links allows any UI user to read all rows without checking source record readability

Aperta
#6,831 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
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
sql

Direzione di ricerca

Start at migrations/v2/V202509171543__v2.101.x__Schema.sql around lines 1004-1007, where CanRead = 1 is granted to the UI role on MJ: Record Links without a row filter. Then find how other entities in this repo apply platform-level row-level read filters and reuse that pattern for SourceEntityID / SourceRecordID. Done means a UI caller only sees links whose source record they can read, confirmed by a test that queries the table as a restricted user.

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

Descrizione

Problem

MJ: Record Links grants CanRead = 1 to the UI role with no row-level read filter (see V202509171543__v2.101.x__Schema.sql).

Because reads against MJ: Record Links are unfiltered, any UI user can query the entire table and see every (SourceEntityID, SourceRecordID, TargetEntityID, TargetRecordID, LinkType) edge—including rows whose source record they do not have permission to open. That leaks which record IDs link to which across private documents, cloned records, and other linked entities, regardless of how links are authored or indexed.

Expected behavior

Platform-level read filtering on MJ: Record Links so a row is visible to a caller only when that caller can read the row's source record (SourceEntityID / SourceRecordID).

Context

Identified during review of #6762 (see #6762 comment). Kept separate from the durable doc-link follow-up PR because MJ: Record Links is a platform-wide polymorphic linking table used across multiple subsystems (including Record Cloning and Semantic Graphs).

Lingua principale
TSQL
Stelle
32
Fork
7
Merge medio
1g 16h
PR unite (30g)
504

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 MemberJunction/MJ

Tutte le issue di MemberJunction/MJ

Issue simili

Altre issue su Backend & API Design

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.