shardeum / shardus-core

Other
10 stars 2 forks source link

PRI-53 : Harden debug middleware against replay attacks (sign the parameters and payload) #255

Closed abdulazeem-tk4vr closed 2 weeks ago

abdulazeem-tk4vr commented 3 weeks ago

linear : https://linear.app/shm/issue/PRI-53

github-actions[bot] commented 3 weeks ago

PR Reviewer Guide ๐Ÿ”

โฑ๏ธ Estimated effort to review: 4 ๐Ÿ”ต๐Ÿ”ต๐Ÿ”ต๐Ÿ”ตโšช
๐Ÿงช No relevant tests
๐Ÿ”’ No security concerns identified
โšก Key issues to review

Typo in Variable Name
The variable `intentedForOurNode` should be renamed to `intendedForOurNode` to correct the typo and improve code readability. Possible Security Issue
The use of `parseInt` without specifying a radix might lead to unexpected behavior. It's safer to specify a radix of 10 to ensure it parses as a decimal number. Code Redundancy
The `stripQueryParams` function is defined but its implementation could be simplified or clarified to avoid unnecessary complexity, particularly in how it handles the query string splitting and rejoining.