Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

`GIDGoogleUser.authState` is sometimes read without a lock

Abierto
#648 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 3 días

@w-goog ya está trabajando en esto.

Desde el 15/10/2026.

  • #652 de @w-goog — abierto

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
18/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
ios, objective-c

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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)

Lenguaje dominante
Objective-C
Estrellas
756
Forks
283
Merge medio
9 d 5 h
PR fusionados (30 d)
4

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de google/GoogleSignIn-iOS

Todos los issues de google/GoogleSignIn-iOS

Issues similares

Más issues de Objective-C

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.