Secret Vault on Aptos

First Flight #46
Beginner FriendlyWallet
100 EXP
View results
Submission Details
Impact: low
Likelihood: low
Invalid

[L-1] Debug print incorrectly printing utf8 string

Description

In test section when doing a print it does not show the string "All tests passed!" but instead returns the object associated to the string

aptos move test
INCLUDING DEPENDENCY AptosFramework
INCLUDING DEPENDENCY AptosStdlib
INCLUDING DEPENDENCY MoveStdlib
BUILDING aptos-secret-vault
Running Move unit tests
[debug] 0x416c6c2074657374732070617373656421
[ PASS ] 0x234::vault::test_secret_vault
Test result: OK. Total tests: 1; passed: 1; failed: 0
{
"Result": "Success"
}

Impact:

Test will print a value that has no meaning for a human read

Recommended Mitigation:

Set the string as utf8 in the debug::print by setting the string as utf8

- debug::print(&b"All tests passed!");
+ debug::print(&string::utf8(b"All tests passed!"));
Updates

Lead Judging Commences

bube Lead Judge 18 days ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.