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

Broken Trino impersonation

Đang mở
#371 1 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 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
35/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ệ
typescript

Hướng nghiên cứu

Start with the input: false setting on user.additionalFields.username, and trace why parseAdditionalUserInputFromProviderProfile drops the username that mapProfileToUser returns during OAuth user creation. Then check the Trino API routes that fall back to locals.user?.username ?? 'anonymous'. Done means the username survives OAuth signup, impersonation works again, the update-user restriction from #330 still holds, and regression tests cover both cases.

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

Mô tả

In #330 I set input: false on user.additionalFields.username to stop users from changing it through /api/auth/update-user.
But better-auth also applies input: false to the OAuth provider profile: parseAdditionalUserInputFromProviderProfile skips such fields, so the username returned by mapProfileToUser is dropped when the user is created.

Without a username, the Trino API routes fall back to locals.user?.username ?? 'anonymous', which hides the error and breaks impersonation.

  • Fix and restore old behavior
  • While also ensuring that the Issue in #330 can not be exploited
  • Add regression tests
Ngôn ngữ chính
TypeScript
Star
1
Fork
0
Merge trung bình
3 ngày 20 giờ
Pull request đã merge (30 ngày)
14

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

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

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 stackabletech/cockpit

Tất cả issue của stackabletech/cockpit

Issue tương tự

Thêm issue về TypeScript

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.