Shared CSV utility with formula-injection protection; use it on Activity

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

I maintainer di solito rispondono entro 1 giorno

@nilhn9660 ci sta già lavorando.

Dal 21/11/2026.

  • #40 di @nilhn9660 — aperta

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
typescript
Ambito
frontend

Direzione di ricerca

Start with the CSV export in web/app/activity/page.tsx, which currently escapes only quotes. The issue proposes a new lib/csv.ts exporting toCsv(rows) that quotes all fields, neutralises cells starting with = + - @ tab or carriage return, and adds a UTF-8 BOM; the existing Activity export should switch to it. Done means a =HYPERLINK(...) description exports as inert text, normal rows round-trip, and unit tests cover these cases. Note that open pull request #40 is already linked, so check it before starting.

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

Descrizione

difficulty: intermediate help wanted refactor security Stellar Wave web

Difficulty: Intermediate

Description

The CSV export in web/app/activity/page.tsx only escapes quotes. Descriptions are arbitrary on-chain text, so anyone can create an invoice whose description starts with =, +, - or @. That is the classic CSV/formula-injection vector when someone opens the export in Excel.

Implementation suggestions

Add lib/csv.ts with toCsv(rows). It quotes every field, doubles quotes, prefixes a ' to cells starting with = + - @ \t \r, and adds a UTF-8 BOM so Excel renders Naira and Unicode correctly.

Acceptance criteria

  • A description of =HYPERLINK(...) exports as inert text.
  • Normal data round-trips.
  • The existing Activity export uses the util.
  • Unit tests are included.

Dependencies / related

Blocks #15 (History export reuses this util). Tests use #13.

Lingua principale
TypeScript
Stelle
0
Fork
4
Merge medio
54m
PR unite (30g)
6

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 Yormee-103/PayLoop

Tutte le issue di Yormee-103/PayLoop

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.