dev-ptera/thebananostand

Deal with newlines in messages to sign

gbl08ma opened this issue · 2 comments

When passing a newline in the message to sign, e.g.

https://thebananostand.com/signing?request=message_sign&address=ban_11juro8jq16455kbggfa1ge3s7jjy6154gtg3pgyn45irw5sdf3qamntjeam&message=test%0Anewline

The newline doesn't appear in the input field,
image

even though it is considered in the signature. ⚠️
It stops being considered as soon as you edit anything in the message input. (delete the last e of the string and add it again, and resign: the signature will change)

This field should really support multiple lines. This is relevant because JungleTV intends to use a message format similar to the one proposed for Ethereum in EIP-4361. Messages JungleTV will request to sign will follow this format:
image

I assume many other services will use multi-line messages because it just makes sense to make certain things more readable. But right now they appear in a single line, making them really hard to read.

This should be fixed now, could you take a look? If it's working as-expected I'll close this issue. @gbl08ma

Seems to work as expected for me!