CSV import endpoint crashes without a file

Aperta
#69 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-3 ore
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
php
Ambito
api

Direzione di ricerca

Start in src/Controller/ImportController.php and find where the csv file field is read, since a missing field raises a TypeError and a 500. Then check the test pinned in tests/Api/ImportTest.php around line 61, which records the current behaviour. The issue suggests removing the endpoint rather than fixing it, so settle that with the maintainer first. Done means the chosen behaviour is implemented and that test is updated to match.

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

Descrizione

Backend bug severity: low

Problem

POST /admin/users/csvimport without the csv file field is not validated, which raises a TypeError and gives a 500.

Note

The member import was a one-off. The planned reconciliation (#61) replaces it and does not import. Consider removing this endpoint instead of fixing it.

Where

src/Controller/ImportController.php.
Pinned in tests/Api/ImportTest.php (around line 61).


Found by the API test suite added for #57 (branch feature/57-symfony-7.4); the behaviour is the same before and after the Symfony 7.4 upgrade. The current behaviour is pinned in the test named above (marked NOTE: current behaviour), so update that test together with the fix.

Lingua principale
PHP
Stelle
1
Fork
0
Merge medio
7h 58m
PR unite (30g)
3

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 RunningJoke/allipunkte

Tutte le issue di RunningJoke/allipunkte

Issue simili

Altre issue su PHP

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.