Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Security hardening for bit Boilerplate's sign-in codes, sessions, chatbot, push, uploads, token storage and CD

Chiusa
#14,109 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Una pull request collegata è già stata integrata.

  • #14114 di @yasmoradi — integrata

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
15/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
csharp
Ambito
security

Direzione di ricerca

The issue lists findings across server, clients, and pipelines, and links open pull request #14114. Start by reviewing that pull request and its changed files to see which findings are already being addressed. The issue does not name tests or specific files; done would require resolving the listed security findings across the affected areas.

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

Descrizione

A security review of bit Boilerplate found the problems below.

Server

  1. The security stamp is inside every access, refresh and OAuth token, and the 6-digit codes (OTP, magic link, reset password, step-up, phone/email 2FA) are TOTP codes keyed on that stamp. Anyone who can read a token can compute the user's codes.
  2. The phone/email 2FA code uses the fixed TwoFactor purpose, so one code stays valid for its whole TOTP window and works more than once.
  3. The AI chat has no limit on message length, answer length or how often one user or IP can chat, so a single caller can run up the AI bill.
  4. A web push subscription's Endpoint can be any URL, and the server POSTs to it through an HttpClient that follows redirects and resolves service discovery names (SSRF). The push endpoints have no rate limit either.
  5. A SignalR connection keeps working for its session after the session is revoked or the security stamp changes.
  6. Resetting the password of an account with 2FA on only needs the code sent to email or SMS, so whoever controls the inbox or the SIM takes the account over.
  7. Uploaded images go to whatever ImageMagick coder matches them (SVG, PS, PDF, ...), and the *Original kinds are served back in the uploaded format.
  8. The send-token endpoints answer UserNotFound for unknown identifiers and sign-up answers DuplicateEmailOrPhoneNumber, so anyone can check which emails and phone numbers have accounts.

Clients

  1. Tokens are stored in plain text: MAUI keeps them in Preferences (which Android backs up) and Windows in a plain JSON file.
  2. Other browser tabs don't notice a sign-in, a sign-out or a user change. A tab can keep showing user A while its API calls carry user B's token.
  3. Signing in while already signed in (for example by opening a magic link) leaves the old session behind. It stays in the sessions list and can hold a privileged session slot for 14 days.
  4. A token refresh that completes after a sign-out writes the tokens back, so the user is signed in again.
  5. When a connection goes straight from user A to user B, AppHub leaves the connection id on A's session too, so A's OTP, PROFILE_UPDATED and SESSION_REVOKED messages reach B.
  6. SESSION_REVOKED carries no session id, so the client signs out whoever is current, and PROFILE_UPDATED is applied without checking the user id.

Pipelines

  1. cd-production.yml deploys every push to main without running the tests, and nothing applies EF migrations outside Development.
  2. The pipelines, the dev container and the docs install Bit.Cli with --prerelease.
Lingua principale
C#
Stelle
1.4k
Fork
264
Merge medio
10h 31m
PR unite (30g)
405

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 bitfoundation/bitplatform

Tutte le issue di bitfoundation/bitplatform

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.