TickerFunctionProvider's registry is publicly writable

Ouverte
#79 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

@harryhawwy69 y travaille déjà.

Depuis le 24/11/2026.

  • #86 par @harryhawwy69 — ouverte

Évaluation

Difficulté
3/5
Temps estimé
1-2 jours
Accessibilité débutants
45/100
Type d'issue
Refactorisation
Clarté
Clairement spécifiée
Activité
Active
Stack technique
csharp

Piste de recherche

Start at src/TickerNet.Utilities/TickerFunctionProvider.cs around lines 35-37 to see how the static registry fields are declared and mutated. Then find every writer of those fields, including the update path in TickerNet.Hub for remote functions, and route it through an internal method while the public surface becomes IReadOnlyDictionary or private set. Add a test that mutates the registry from outside and fails against the current fields, check the ADR and release-notes conventions before writing them, and note that PR #86 already touches this area, so coordinate rather than duplicate.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

.NET bug

What happens

TickerFunctionProvider (src/TickerNet.Utilities/TickerFunctionProvider.cs, around lines 35-37) exposes its function registry as public, writable static fields. Any code can replace them after startup, which breaks scheduling in ways that are hard to trace.

Fix idea

Make them read-only properties (private set, or IReadOnlyDictionary). This changes public API, so it needs an ADR and a note in the release notes; check TickerNet.Hub, which updates the registry for remote functions, still works through an internal method.


Found while checking which problems that TickerQ fixed after the fork still exist in TickerNet. Fix it from this description and TickerNet's own code only: never read or copy code from TickerQ 10.5.0 or later (see CONTRIBUTING.md). Please add a test that fails before the fix.

Langage dominant
C#
Étoiles
0
Forks
2
Merge moyen
1 h 8 min
PR mergées (30 j)
24

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de TickerNet/TickerNet

Toutes les issues de TickerNet/TickerNet

Issues similaires

Plus d'issues C#

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.