Check types of method/signal arguments and return values
Chưa có ai nhận issue này.
Đá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
- 25/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- ruby
- Lĩnh vực
- backend-api-design
Hướng nghiên cứu
Start by reviewing the requirements for client and service method arguments and return values, signal delivery, and Properties.Set, along with related issue #97. Identify the existing client/service dispatch and introspection paths before deciding the scope. Done should include deliberate type errors with defined error behavior across the listed cases.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Both at the client and service side we should add type checking of method arguments and return values
(This is related to #97 which was specifically about properties)
-
Client method arguments, emitting signals: trying to use a string instead of an integer, or the other way around, will raise an exception before the bus sees the wrong type, but the exception is an implementation accident. It should be an explicit
type A was expected but type B was seen, in argument foo
(the the method and interface names will be easily seen from the backtrace)
-
Client return values: not trying to catch confused/malicious services for now
-
Service method arguments: this should be avoided by client libraries paying attention to introspection data and doing their own type checking (see (1)), but it is relatively easy to send a mistyped call. Here an example of passing an integer where a string is expected, the caller gets to see an exception caused by the wrong type:
$ dbus-send --print-reply --session --dest=org.ruby.service /org/ruby/MyInstance org.ruby.AnotherInterface.Reverse uint32:42 Error org.freedesktop.DBus.Error.Failed: undefined method `split' for 42:Integer outstr = instr.split(//).reverse.join ^^^^^^; caused by 1 sender=:1.1226 -> dest=org.ruby.service serial=2 reply_serial= path=/org/ruby/MyInstance; interface=org.ruby.AnotherInterface; member=Reverse error_name=TODO: find a well known error name+format for type errors
Listening for signals: what if someone sends a mistyped signal? Could be even pretty easy if the listener filters only on interface and not a well-known sender
Properties.Set with a wrong type: I know I said this was about methods, not properties, but I think this check is still missing :-(
-
Service return values: similar to (1)
- Ngôn ngữ chính
- Ruby
- Star
- 174
- Fork
- 51
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
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
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của mvidner/ruby-dbus
-
Specify rexml versioningĐang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
-
Rexml or Nokogiri?Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
-
NetworkManager.Settings.Connection cannot round-trip, calling Update with what GetSettings returnedĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
-
good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 45/100
-
UNIX_FD in practice?Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 32/100
Tất cả issue của mvidner/ruby-dbus
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
ublue-os/homebrew-experimental-tap#774 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
accessibility
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
slovensko-digital/ops-portal#212 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Local evaluation buckets percentage splits with the server key, so results differ from FlagsmithĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Add PrestashopĐang mởrequest
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
endoflife-date/endoflife.date#11303 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100