Skip to content

Commit 9e79470

Browse files
committed
Explicitly require transports to validate inbound messages
The L1 specification has been updated to explicitly require transports to validate inbound messages and discard invalid ones. This change enhances the robustness and security of the protocol by ensuring that only well-formed messages are processed by higher levels. Note that the validation of outbound messages is already required by the "send" operation.
1 parent 0cc43c8 commit 9e79470

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

up-l1/README.adoc

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,9 +220,9 @@ UTransport implementations
220220
* *MUST* fail invocations of <<receive>> with a `UCode.UNIMPLEMENTED`, if the transport does not support the _pull_ <<delivery-method, delivery method>>.
221221
--
222222

223-
[.specitem,oft-sid="dsn~utransport-receive-error-notfound~1",oft-needs="impl,utest",oft-tags="TransportLayerImplPull"]
223+
[.specitem,oft-sid="dsn~utransport-receive-error-notfound~2",oft-needs="impl,utest",oft-tags="TransportLayerImplPull"]
224224
--
225-
* *MUST* fail invocations of <<receive>> with a `UCode.NOT_FOUND`, if there are no matching messages available.
225+
* *MUST* fail invocations of <<receive>> with a `UCode.NOT_FOUND`, if there are no matching messages available. This is also the case if the a package data unit cannot be deserialized into a valid xref:../basics/umessage.adoc[uProtocol message]. Transport implementations *SHOULD* use the validation functionality provided by language libraries for this purpose, if available.
226226
--
227227

228228
[mermaid]
@@ -335,6 +335,11 @@ UTransport implementations
335335
* *MUST* deliver matching messages to a successfully registered listener. This means that for each message that the transport receives _after_ <<register-listener>> has completed successfully, and which matches the listener's source and sink filter criteria according to the xref:../basics/uri.adoc#pattern-matching[UUri pattern matching rules], the transport *MUST* invoke the listener's <<on-receive>> method _at least once_.
336336
--
337337

338+
[.specitem,oft-sid="dsn~utransport-registerlistener-discard-invalid-messages~1",oft-needs="impl,utest",oft-tags="TransportLayerImplPush"]
339+
--
340+
* *MUST* discard any inbound transport specific package data unit that cannot be deserialized into a valid xref:../basics/umessage.adoc[uProtocol message]. Transport implementations *SHOULD* use the validation functionality provided by language libraries for this purpose, if available.
341+
--
342+
338343
[.specitem,oft-sid="req~utransport-registerlistener-prevent-unauthorized-access~1",oft-needs="dsn,uman",oft-tags="TransportLayerImpl"]
339344
--
340345
* *MUST* provide means to prevent a uEntity using this transport from consuming messages that it is not authorized to process.

0 commit comments

Comments
 (0)