Ajouter de la vérification pour le tri de EventService.GetEvents
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 68/100
Research direction
Start at EventService.GetEvents and follow the sort parameter from the controller action that calls it, so you can see where the raw column name arrives and how the query is built. Pick one of the two suggested approaches: an enum of sortable keys serialized as text, or an internal allow-list that throws a dedicated exception. Done means an invalid sort value yields a 400 Bad Request handled by the controller instead of an unhandled 500, with a test covering both a valid and an invalid key.
Written by the indexing model from the issue text.
Description
Présentement, on peut rentrer n'importe quelle colonne du schéma de donnée (ou même n'importe quoi, en fait). Donc, si la valeur n'est pas valide, ça va lancer lancer une exception non gérée (donc, code 500) alors que ça devrait indiquer 400 (Bad Request).
Pistes de solution:
- Restreindre les clés disponibles à l'aide d'une énumération qui se sérialisera sous forme de texte, puis récupérer la propriété sur laquelle trier en conséquence
- Restreindre les clés disponibles à l'aide d'une liste interne au service. Si le nom n'est pas trouvé, lancer une exception qui devra être géré par le contrôleur.
- Dominant language
- C#
- Stars
- 1
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ApplETS/Backend-Hello
-
:1st_place_medal: good first issue :cowboy_hat_face: refactor :scroll: documentation
Difficulty 5/5 Over a week Newbie friendliness 35/100
ApplETS/Backend-Hello#76 ·
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
ApplETS/Backend-Hello#75 ·
-
:1st_place_medal: good first issue :roller_coaster: enhancement
Difficulty 4/5 3-5 days Newbie friendliness 55/100
ApplETS/Backend-Hello#74 ·
-
:roller_coaster: enhancement
Difficulty 5/5 Over a week Newbie friendliness 28/100
ApplETS/Backend-Hello#73 ·
-
:roller_coaster: enhancement
Difficulty 5/5 Over a week Newbie friendliness 35/100
ApplETS/Backend-Hello#71 ·
All issues in ApplETS/Backend-Hello
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
possible bug
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Include host.wslc.internal in the HTTPS development certificatePossibly taken @afscrome claimed this today. Openarea-commandlinetools
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
dotnet/aspnetcore#70122 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 2 days
-
status/triage
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Altinn/altinn-studio#21642 ·
Maintainers usually reply within 1 day