Bitcoin Forum

Bitcoin => Electrum => Topic started by: BlackHatCoiner on December 04, 2020, 09:56:41 AM



Title: Problem with decryption of an html text
Post by: BlackHatCoiner on December 04, 2020, 09:56:41 AM
I encrypted my profile page's source just to test something and once I tried to decrypt it, it didn't show me the original text. Is this some kind of bug? Why does the textfield understand html?

https://i.imgur.com/dGyxWxh.png


Title: Re: Problem with decryption of an html text
Post by: NeuroticFish on December 04, 2020, 10:20:18 AM
Indeed, I've reproduced this. Encrypt html is fine, decrypting it shows it as web page.
It may somewhat make sense. I mean if I make a html e-mail and encrypt it for you, at decrypting you may want to see the e-mail (web view), not its source.
However, maybe you can ask on https://github.com/spesmilo/electrum/issues about this.


Title: Re: Problem with decryption of an html text
Post by: pooya87 on December 04, 2020, 11:14:10 AM
I don't think this is a bug, this is meant to be like this.
Whenever user inputs random strings as "message", usually clients modify it to strip the message string of any "code" or invalid characters then use it. Which seems to be what's happening right here.
https://github.com/spesmilo/electrum/blob/7e18e2ea3199380d78e75dec0da4e85939ddf170/electrum/gui/qt/main_window.py#L2596-L2597