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

Unnecessary escaping in logs returned from secret contracts #581

Closed
reuvenpo opened this issue Oct 11, 2020 · 0 comments
Closed

Unnecessary escaping in logs returned from secret contracts #581

reuvenpo opened this issue Oct 11, 2020 · 0 comments
Labels
bug Something isn't working dev Critical path development tasks good first issue Good for newcomers p-medium

Comments

@reuvenpo
Copy link
Contributor

reuvenpo commented Oct 11, 2020

@baedrik noticed an issue when trying to pass characters that are usually escaped in strings, through secret contract logs.

The flow here is:

  • Pass a string to the cosmwasm_std::log function
  • Return it from the handle/query/init function
  • Read it with secretcli q compute tx

He observed that e.g. a literal " turns into a literal \\\", and \n (a newline) turned into a literal \\n

This is probably a compound of two different serialization bugs in different parts of the system, because of the double escaping.

EDIT: marked as "good first issue" since it's probably a simple programming error, and could get someone new familiar with the codebase, if they want to start contributing.

@reuvenpo reuvenpo added bug Something isn't working dev Critical path development tasks good first issue Good for newcomers p-medium labels Oct 11, 2020
baedrik added a commit to baedrik/SecretNetwork that referenced this issue Oct 16, 2020
baedrik added a commit to baedrik/SecretNetwork that referenced this issue Oct 16, 2020
Cashmaney added a commit that referenced this issue Oct 18, 2020
fixes #581 (double escaping logs)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working dev Critical path development tasks good first issue Good for newcomers p-medium
Projects
None yet
Development

No branches or pull requests

2 participants