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

Packet data must not be assumed to be valid UTF-8 #200

Merged
merged 5 commits into from
Oct 27, 2022

Conversation

plafer
Copy link
Contributor

@plafer plafer commented Oct 26, 2022

Closes: #199


PR author checklist:

  • Added changelog entry, using unclog.
  • Added tests.
  • Linked to GitHub issue.
  • Updated code comments and documentation (e.g., docs/).
  • Tagged one reviewer who will be the one responsible for shepherding this PR.

Reviewer checklist:

  • Reviewed Files changed in the GitHub PR explorer.
  • Manually tested (in case integration/unit/mock tests are absent).

@plafer plafer requested a review from romac October 26, 2022 19:16
@romac romac changed the title Packet data must not be assumed to be utf8 Packet data must not be assumed to be valid UTF-8 Oct 27, 2022
crates/ibc/src/core/ics04_channel/error.rs Outdated Show resolved Hide resolved
crates/ibc/src/core/ics04_channel/events.rs Outdated Show resolved Hide resolved
crates/ibc/src/events.rs Outdated Show resolved Hide resolved
Signed-off-by: Romain Ruetschi <[email protected]>
@romac romac merged commit 733e28c into v0.21.x Oct 27, 2022
@romac romac deleted the plafer/199-packet-data-utf8 branch October 27, 2022 08:56
plafer added a commit that referenced this pull request Oct 27, 2022
* Make `ClientType` allow any string value (#189)

* ClientType now wraps a str

* Make ClientType accept any string

* doctest

* changelog

* use client_type() fn instead of constant

* use client_type() for mock

* release v0.21.0 (#192)

* release v0.21.0

* version bumped to 0.21.0

* contributing edit

* Update .changelog/v0.21.0/summary.md

Co-authored-by: Romain Ruetschi <[email protected]>
Signed-off-by: Philippe Laferrière <[email protected]>

* Update CHANGELOG.md

Co-authored-by: Romain Ruetschi <[email protected]>
Signed-off-by: Philippe Laferrière <[email protected]>

Signed-off-by: Philippe Laferrière <[email protected]>
Co-authored-by: Romain Ruetschi <[email protected]>

* Packet data must not be assumed to be valid UTF-8 (#200)

* Add failing test

* fix the bug

* changelog

* fmt

* Reword a couple messages

Signed-off-by: Romain Ruetschi <[email protected]>
Co-authored-by: Romain Ruetschi <[email protected]>

* Release v0.21.1 (#202)

* release v0.21.1

* bump to version 0.21.1

Signed-off-by: Philippe Laferrière <[email protected]>
Signed-off-by: Romain Ruetschi <[email protected]>
Co-authored-by: Romain Ruetschi <[email protected]>
plafer added a commit that referenced this pull request Oct 27, 2022
* Make `ClientType` allow any string value (#189)

* ClientType now wraps a str

* Make ClientType accept any string

* doctest

* changelog

* use client_type() fn instead of constant

* use client_type() for mock

* release v0.21.0 (#192)

* release v0.21.0

* version bumped to 0.21.0

* contributing edit

* Update .changelog/v0.21.0/summary.md

Co-authored-by: Romain Ruetschi <[email protected]>
Signed-off-by: Philippe Laferrière <[email protected]>

* Update CHANGELOG.md

Co-authored-by: Romain Ruetschi <[email protected]>
Signed-off-by: Philippe Laferrière <[email protected]>

Signed-off-by: Philippe Laferrière <[email protected]>
Co-authored-by: Romain Ruetschi <[email protected]>

* Packet data must not be assumed to be valid UTF-8 (#200)

* Add failing test

* fix the bug

* changelog

* fmt

* Reword a couple messages

Signed-off-by: Romain Ruetschi <[email protected]>
Co-authored-by: Romain Ruetschi <[email protected]>

* Release v0.21.1 (#202)

* release v0.21.1

* bump to version 0.21.1

Signed-off-by: Philippe Laferrière <[email protected]>
Signed-off-by: Romain Ruetschi <[email protected]>
Co-authored-by: Romain Ruetschi <[email protected]>
plafer added a commit that referenced this pull request Nov 3, 2022
* few channel attributes

* Refactor Channel's `OpenInit`

* Create channel_events() and remove event emission from all channel handlers

* channel OpenTry event cleaned up

* OpenAck cleaned up

* OpenConfirm cleaned up

* cleanup chan_close_init

* cleanup CloseConfirm event and remove Attributes

* Remove unused trait

* fix compilation + clippy

* fix tests

* finish implementing channel_events()

* channel_dispatch now discards events

* clean up generated logs

* chan_open_init_event test

* chan_open_try_event test

* chan_open_ack_event test

* test_chan_open_confirm_event test

* chan_close_init event test

* chan_close_confirm_event test

* clippy

* DataAttribute struct

* DataHexAttribute

* TimeoutHeightAttribute

* TimeoutTimestampAttribute

* SequenceAttribute

* ChannelOrderingAttribute

* Merge v0.21.1 (#203)

* Make `ClientType` allow any string value (#189)

* ClientType now wraps a str

* Make ClientType accept any string

* doctest

* changelog

* use client_type() fn instead of constant

* use client_type() for mock

* release v0.21.0 (#192)

* release v0.21.0

* version bumped to 0.21.0

* contributing edit

* Update .changelog/v0.21.0/summary.md

Co-authored-by: Romain Ruetschi <[email protected]>
Signed-off-by: Philippe Laferrière <[email protected]>

* Update CHANGELOG.md

Co-authored-by: Romain Ruetschi <[email protected]>
Signed-off-by: Philippe Laferrière <[email protected]>

Signed-off-by: Philippe Laferrière <[email protected]>
Co-authored-by: Romain Ruetschi <[email protected]>

* Packet data must not be assumed to be valid UTF-8 (#200)

* Add failing test

* fix the bug

* changelog

* fmt

* Reword a couple messages

Signed-off-by: Romain Ruetschi <[email protected]>
Co-authored-by: Romain Ruetschi <[email protected]>

* Release v0.21.1 (#202)

* release v0.21.1

* bump to version 0.21.1

Signed-off-by: Philippe Laferrière <[email protected]>
Signed-off-by: Romain Ruetschi <[email protected]>
Co-authored-by: Romain Ruetschi <[email protected]>

* merge DataAttribute and DataHexAttribute

* chan_open_init event compatible

* recv_packet compatible

* fix previous events

* WriteAcknowledgement compatible

* Acknowledgement event compatible

* packet Timeout event compatible

* timeout_on_close handler event emission compatible

* Remove stale code

* create ChannelClosed event

* from -> into

* rename PacketMsg timeout variants

* update comment

* ChannelClosed event in timeout handler

* timeout on close

* changelog

* move channel attributes to a submodule

* move packet attributes to submodule

* Update crates/ibc/src/core/ics04_channel/events.rs

Co-authored-by: Shoaib Ahmed <[email protected]>
Signed-off-by: Philippe Laferrière <[email protected]>

* Update crates/ibc/src/core/ics04_channel/events.rs

Co-authored-by: Shoaib Ahmed <[email protected]>
Signed-off-by: Philippe Laferrière <[email protected]>

* asref counterparty channel id

* timeoutPacket event fix

* write_acknowledgement fix

* acknowledge packet fix

* write ack actual fix

* fix counterparty attributes

* add clarifying comment

* Update crates/ibc/src/core/ics04_channel/events.rs

Co-authored-by: Shoaib Ahmed <[email protected]>
Signed-off-by: Philippe Laferrière <[email protected]>

* Update crates/ibc/src/core/ics04_channel/events.rs

Co-authored-by: Shoaib Ahmed <[email protected]>
Signed-off-by: Philippe Laferrière <[email protected]>

* clippy

Signed-off-by: Philippe Laferrière <[email protected]>
Signed-off-by: Romain Ruetschi <[email protected]>
Co-authored-by: Romain Ruetschi <[email protected]>
Co-authored-by: Shoaib Ahmed <[email protected]>
Farhad-Shabani pushed a commit that referenced this pull request Sep 9, 2024
* Make `ClientType` allow any string value (#189)

* ClientType now wraps a str

* Make ClientType accept any string

* doctest

* changelog

* use client_type() fn instead of constant

* use client_type() for mock

* release v0.21.0 (#192)

* release v0.21.0

* version bumped to 0.21.0

* contributing edit

* Update .changelog/v0.21.0/summary.md

Co-authored-by: Romain Ruetschi <[email protected]>
Signed-off-by: Philippe Laferrière <[email protected]>

* Update CHANGELOG.md

Co-authored-by: Romain Ruetschi <[email protected]>
Signed-off-by: Philippe Laferrière <[email protected]>

Signed-off-by: Philippe Laferrière <[email protected]>
Co-authored-by: Romain Ruetschi <[email protected]>

* Packet data must not be assumed to be valid UTF-8 (#200)

* Add failing test

* fix the bug

* changelog

* fmt

* Reword a couple messages

Signed-off-by: Romain Ruetschi <[email protected]>
Co-authored-by: Romain Ruetschi <[email protected]>

* Release v0.21.1 (#202)

* release v0.21.1

* bump to version 0.21.1

Signed-off-by: Philippe Laferrière <[email protected]>
Signed-off-by: Romain Ruetschi <[email protected]>
Co-authored-by: Romain Ruetschi <[email protected]>
Farhad-Shabani pushed a commit that referenced this pull request Sep 9, 2024
* few channel attributes

* Refactor Channel's `OpenInit`

* Create channel_events() and remove event emission from all channel handlers

* channel OpenTry event cleaned up

* OpenAck cleaned up

* OpenConfirm cleaned up

* cleanup chan_close_init

* cleanup CloseConfirm event and remove Attributes

* Remove unused trait

* fix compilation + clippy

* fix tests

* finish implementing channel_events()

* channel_dispatch now discards events

* clean up generated logs

* chan_open_init_event test

* chan_open_try_event test

* chan_open_ack_event test

* test_chan_open_confirm_event test

* chan_close_init event test

* chan_close_confirm_event test

* clippy

* DataAttribute struct

* DataHexAttribute

* TimeoutHeightAttribute

* TimeoutTimestampAttribute

* SequenceAttribute

* ChannelOrderingAttribute

* Merge v0.21.1 (#203)

* Make `ClientType` allow any string value (#189)

* ClientType now wraps a str

* Make ClientType accept any string

* doctest

* changelog

* use client_type() fn instead of constant

* use client_type() for mock

* release v0.21.0 (#192)

* release v0.21.0

* version bumped to 0.21.0

* contributing edit

* Update .changelog/v0.21.0/summary.md

Co-authored-by: Romain Ruetschi <[email protected]>
Signed-off-by: Philippe Laferrière <[email protected]>

* Update CHANGELOG.md

Co-authored-by: Romain Ruetschi <[email protected]>
Signed-off-by: Philippe Laferrière <[email protected]>

Signed-off-by: Philippe Laferrière <[email protected]>
Co-authored-by: Romain Ruetschi <[email protected]>

* Packet data must not be assumed to be valid UTF-8 (#200)

* Add failing test

* fix the bug

* changelog

* fmt

* Reword a couple messages

Signed-off-by: Romain Ruetschi <[email protected]>
Co-authored-by: Romain Ruetschi <[email protected]>

* Release v0.21.1 (#202)

* release v0.21.1

* bump to version 0.21.1

Signed-off-by: Philippe Laferrière <[email protected]>
Signed-off-by: Romain Ruetschi <[email protected]>
Co-authored-by: Romain Ruetschi <[email protected]>

* merge DataAttribute and DataHexAttribute

* chan_open_init event compatible

* recv_packet compatible

* fix previous events

* WriteAcknowledgement compatible

* Acknowledgement event compatible

* packet Timeout event compatible

* timeout_on_close handler event emission compatible

* Remove stale code

* create ChannelClosed event

* from -> into

* rename PacketMsg timeout variants

* update comment

* ChannelClosed event in timeout handler

* timeout on close

* changelog

* move channel attributes to a submodule

* move packet attributes to submodule

* Update crates/ibc/src/core/ics04_channel/events.rs

Co-authored-by: Shoaib Ahmed <[email protected]>
Signed-off-by: Philippe Laferrière <[email protected]>

* Update crates/ibc/src/core/ics04_channel/events.rs

Co-authored-by: Shoaib Ahmed <[email protected]>
Signed-off-by: Philippe Laferrière <[email protected]>

* asref counterparty channel id

* timeoutPacket event fix

* write_acknowledgement fix

* acknowledge packet fix

* write ack actual fix

* fix counterparty attributes

* add clarifying comment

* Update crates/ibc/src/core/ics04_channel/events.rs

Co-authored-by: Shoaib Ahmed <[email protected]>
Signed-off-by: Philippe Laferrière <[email protected]>

* Update crates/ibc/src/core/ics04_channel/events.rs

Co-authored-by: Shoaib Ahmed <[email protected]>
Signed-off-by: Philippe Laferrière <[email protected]>

* clippy

Signed-off-by: Philippe Laferrière <[email protected]>
Signed-off-by: Romain Ruetschi <[email protected]>
Co-authored-by: Romain Ruetschi <[email protected]>
Co-authored-by: Shoaib Ahmed <[email protected]>
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

Successfully merging this pull request may close these issues.

2 participants