Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transaction Frame commands allow null transaction ID #177

Open
whikloj opened this issue Jun 24, 2023 · 0 comments
Open

Transaction Frame commands allow null transaction ID #177

whikloj opened this issue Jun 24, 2023 · 0 comments

Comments

@whikloj
Copy link
Collaborator

whikloj commented Jun 24, 2023

In Stomp\Protocol\Protocol the methods for transaction BEGIN, COMMIT & ABORT commands all allow null for the transaction ID.
https://github.com/stomp-php/stomp-php/blob/master/src/Protocol/Protocol.php#L161
https://github.com/stomp-php/stomp-php/blob/master/src/Protocol/Protocol.php#L174
https://github.com/stomp-php/stomp-php/blob/master/src/Protocol/Protocol.php#L187

This seems to violate the Stomp specification which says

The transaction header is REQUIRED, and the transaction identifier will be used for SEND, COMMIT, ABORT, ACK, and NACK frames to bind them to the named transaction.

and

The transaction header is REQUIRED and MUST specify the identifier of the transaction to (commit|abort).

https://stomp.github.io/stomp-specification-1.2.html#BEGIN
https://stomp.github.io/stomp-specification-1.2.html#COMMIT
https://stomp.github.io/stomp-specification-1.2.html#ABORT

Either the $transactionId should be required or the method should throw an Exception if the $transactionId is null.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant