Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

`GIDGoogleUser.authState` is sometimes read without a lock

Offen
#648 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Anfängerfreundlichkeit
18/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
ios, objective-c

Rechercherichtung

Start in GIDGoogleUser, where the private lock guards authState, then trace the direct accesses the issue lists: GIDSignIn (addScopes and disconnect), GIDEMMSupport, and GTMAuthSession.primeForRefresh. The issue names no file paths or tests. Done means every read and write goes through one lock and multi-field reads happen in a single acquisition, but the issue leaves open whether the fix goes inside OIDAuthState or into the public API, so agree that with maintainers first.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

AC:

  • Reads & writes to GIDGoogleUser.authState are serialized under one lock. Multi-field reads must happen in the same lock acquisition.

Background:
GIDGoogleUser serializes its own authState updates & multi-field reads under a private lock. However, the following readers access it directly:

  • GIDSignIn, for the addScopes and disconnect paths
  • GIDEMMSupport accesses it via authSession.authState
  • Apps can access it via fetcherAuthorizer. Worse still, the authorizer can also write to that state via -[OIDAuthState performActionWithFreshTokens:additionalRefreshParameters:].
  • GTMAuthSession.primeForRefresh can also write to authState.

The full fix probably needs a lock inside OIDAuthState itself, or a public API change pushing reads via GIDGoogleUser & disallowing direct access. (OIDAuthState does not have an internal lock, currently)

Vorherrschende Sprache
Objective-C
Sterne
756
Forks
283
Ø Merge
3 T. 1 Std.
Gemergte PRs (30 T.)
2

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus google/GoogleSignIn-iOS

Alle Issues in google/GoogleSignIn-iOS

Ähnliche Issues

Weitere Issues zu Objective-C

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.