actix / actix/actix-web

Invalid cookies can be created without error

Đang mở
#3,065 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
A-web C-bug C-bug-upstream
Ngôn ngữ chính
Rust
Star
24.8k
Fork
1.9k
Merge trung bình
23 giờ 10 phút
Pull request đã merge (30 ngày)
26

Mô tả

[Cookie::set_value](https://docs.rs/actix-web/latest/actix_web/cookie/struct.Cookie.html#method.set_value) accepts any unicode string and never fails, but some unicode strings [are not valid cookie values](https://datatracker.ietf.org/doc/html/rfc6265#section-4.1.1).

Could we add a `try_set_value` method that only accepts valid values ?

Otherwise, we end up with confusing error messages, generated far from where the true source of the error is.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Start with Cookie::set_value in the linked API documentation and compare accepted values with RFC 6265 §4.1.1. Done means a try_set_value entry point rejects invalid cookie values and exposes the failure at the call site, with coverage for accepted and rejected values.

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

Đánh giá

Công nghệ
rust
Lĩnh vực
api, backend
Loại issue
Tính năng
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
38/100

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.