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

Metadata API: SuccinctRoles.is_delegated_role() accepts non-canonical bin names

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

@Anandb71 đang làm issue này rồi.

Từ ngày 18/10/2026.

  • #3034 của @Anandb71 — đang mở

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
42/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python
Lĩnh vực
backend, security

Hướng nghiên cứu

Read SuccinctRoles.is_delegated_role() and the tests for delegated role names, then check how get_roles() and get_role_for_target() generate canonical names. Add coverage for the non-canonical suffixes listed in the issue and confirm they are rejected while generated names remain accepted. The issue author says a fix and tests are ready, so check the thread for their promised pull request before starting.

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

Mô tả

SuccinctRoles.is_delegated_role() validates the bin suffix with int(suffix, 16). int() also accepts a leading sign, surrounding whitespace, underscores between digits and upper case digits, so with SuccinctRoles([], 1, 5, "bin") the names bin-+f, bin- f, bin-f , bin-0F are reported as delegated (and bin-1_0 with bit_length 12), although get_roles()/get_role_for_target() only ever produce zero-padded lower case names like bin-0f. Targets.get_delegated_role() relies on this check. I'd expect only the exact generated names to be accepted.

I have a fix with tests ready and will open a PR.

Ngôn ngữ chính
Python
Star
1.7k
Fork
307
Merge trung bình
8 giờ 11 phút
Pull request đã merge (30 ngày)
12

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 theupdateframework/python-tuf

Tất cả issue của theupdateframework/python-tuf

Issue tương tự

Thêm issue về Python

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.