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

Prevent duplicate Login Flow v2 requests when the browser is still starting

Aperta Adatta ai principianti
#11,110 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
68/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
cpp

Direzione di ricerca

Inizia da AccountWizardController::initialiseAccount, startLoginFlowAutomatically e Flow2Auth::openBrowser() per ricostruire come gli avvii automatici e manuali del browser recuperano i token di accesso. Controlla il pulsante della procedura guidata dell’account e la gestione dello stato, poi aggiungi una protezione che impedisca un secondo flusso mentre si avvia il primo browser. Il lavoro è completato quando i clic ripetuti durante l’avvio non creano un altro flusso di accesso; verifica che la procedura guidata continui a completare l’accesso.

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

Descrizione

0. Needs triage bug

Version: desktop client 35.0.0 (ce977e3, Launchpad PPA nextcloud-devs/client), Ubuntu 26.04, GNOME, Firefox. Server 34.0.4.

Steps

  1. Configure overrideServerUrl (e.g. nextcloud --overrideserverurl https://cloud.example). The account wizard then starts the login flow automatically (AccountWizardController::initialiseAccount → startLoginFlowAutomatically).
  2. The browser isn't running yet, so it takes a few seconds to appear. Meanwhile the wizard shows "Switch to your browser" with an "Open" button.
  3. Click "Open" during that window. It calls Flow2Auth::openBrowser() → fetchNewToken(): a second POST /index.php/login/v2 and a second xdg-open.

Result
The browser opens two tabs at once, sharing the session cookie. The server keeps a single login token and a single state token per session (ClientFlowLoginV2Controller::landing / showAuthPickerPage), so one tab gets "State token does not match" / 403. Depending on request order, the surviving tab may complete a flow the client no longer polls (the client only polls the newest token), and the account setup doesn't finish.

Expected
A second "Open" shortly after a token was fetched should not start a new flow until the first browser launch had a chance to show up. For example: disable the button for a few seconds after openBrowser, or show an "Opening your browser…" status.

Server access log (one attempt): one status.php / auth-type probe, then POST /index.php/login/v2 at t and t+2 s, two GET /login/v2/flow/<token> at t+4 s, and GET /login/v2/flow → 403 at t+6 s. The user confirmed they clicked "Open" once while waiting for the browser.

Lingua principale
C++
Stelle
3.9k
Fork
1k
Merge medio
15h 28m
PR unite (30g)
95

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 nextcloud/desktop

Tutte le issue di nextcloud/desktop

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.