Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

`GIDGoogleUser.authState` is sometimes read without a lock

Đang mở
#648 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 3 ngày

@w-goog đang làm issue này rồi.

Từ ngày 15/10/2026.

  • #652 của @w-goog — đang mở

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
18/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
ios, objective-c
Lĩnh vực
authentication, mobile

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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)

Ngôn ngữ chính
Objective-C
Star
756
Fork
283
Merge trung bình
9 ngày 5 giờ
Pull request đã merge (30 ngày)
4

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của google/GoogleSignIn-iOS

Tất cả issue của google/GoogleSignIn-iOS

Issue tương tự

Thêm issue về Objective-C

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.