[
https://issues.apache.org/jira/browse/PROTON-2977?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18121395#comment-18121395
]
ASF subversion and git services commented on PROTON-2977:
---------------------------------------------------------
Commit 3794f2d2bdd64b59c6b1989cd3a00898a84fcc99 in qpid-proton's branch
refs/heads/main from Andrew Stitcher
[ https://gitbox.apache.org/repos/asf?p=qpid-proton.git;h=3794f2d2b ]
PROTON-2977: Enforce the 32 octet maximum on outgoing delivery tags
The spec allows a delivery-tag of at most 32 octets, but nothing enforced it.
pn_delivery() duplicated whatever the caller passed and the encoder wrote it
out.
Truncate rather than reject. Rejecting would mean pn_delivery() returning NULL
for a reason no existing caller distinguishes, and the tags that overrun come
from application code we don't control.
Truncate in pn_delivery() rather than when encoding the performative, so that
pn_delivery_tag() reports what actually goes on the wire. Truncating only on
the way out would leave sender and receiver permanently disagreeing about a
delivery's identity, breaking anything that correlates by tag - the unsettled
map used for link resume in particular.
Outgoing tags only. A receiver's tag comes off the wire, and an over long one
there is the peer's violation to report rather than something to rewrite
silently underneath our own application.
The major potential issue is a tag scheme that puts its distinguishing part
last,
"producer-instance-7-000001" and the like will stop having unique tags. So warn
only once per link, quoting the tag actually sent so it can be matched against
a wire trace: Warning per delivery would flood the log of a busy sender.
Assisted-By: Claude Opus 5 <[email protected]>
> Delivery tags are not limited to 32 bytes
> -----------------------------------------
>
> Key: PROTON-2977
> URL: https://issues.apache.org/jira/browse/PROTON-2977
> Project: Qpid Proton
> Issue Type: Bug
> Components: proton-c
> Reporter: Andrew Stitcher
> Assignee: Andrew Stitcher
> Priority: Major
>
> When creating deliveries using pn_delivery() you can specify a tag more then
> 32 bytes long and it will be accepted and used on the wire. This means that
> you can create semantically valid but illegal protocol frames.
> Since this is a long standing error in the proton implementation it would be
> best if we don't suddenly start erroring pn_delivery() calls that previously
> succeeded, but we also shouldn't create illegal protocol frames. IT'll
> probably be best to truncate illegal tags to 32 bytes long.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]