Assessment reports>Packet Forward Middleware>Medium findings>Missing prefix for ,RefundPacketKey
Category: Coding Mistakes

Missing prefix for RefundPacketKey

Medium Severity
Informational Impact
Low Likelihood

Description

The RefundPacketKey function does not include a prefix that disambiguates it from other possible store paths.

Impact

While there are currently no other slash-separated store paths in Packet Forward Middleware's Keeper than RefundPacketKey, if one is added in the future, values stored under RefundPacketKey may collide with it.

Recommendations

We suggest adding a prefix that disambiguates RefundPacketKey.

 func RefundPacketKey(channelID, portID string, sequence uint64) []byte {
-    return []byte(fmt.Sprintf("%s/%s/%d", channelID, portID, sequence))
+    return []byte(fmt.Sprintf("refund_packet/%s/%s/%d", channelID, portID, sequence))
 }

Remediation

Zellic © 2025Back to top ↑