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

Add a warning about harmful code to the Qt console #3700

Merged
merged 1 commit into from Jun 26, 2018

Conversation

bauerj
Copy link
Member

@bauerj bauerj commented Jan 11, 2018

This adds a warning about malicious code to the console window. It should help prevent users from executing code they found online.

Screenshots

This warning is certainly hard to miss:
python_2018-01-12_00-08-25

Clicking the message indeed hides it:
python_2018-01-12_00-08-31

Related: #3678

@coveralls
Copy link

coveralls commented Jan 11, 2018

Coverage Status

Coverage increased (+0.03%) to 42.958% when pulling 43230a7 on bauerj:console-warning into 453cc26 on spesmilo:master.

@SomberNight
Copy link
Member

Tested, looks good.

Though depending on QT version, the last line is sometimes not shown; and the text is not wrapped.
Not sure these are worth fixing, unless they are one-liners.


All pics on Debian 9.

PyQt 5.7

pic3
pic4

PyQt 5.9

pic1
pic5

@bauerj
Copy link
Member Author

bauerj commented Jan 12, 2018

Thanks for testing! I didn't find a way to automatically increase the size of the label based on the content size. However, I've enabled word wrapping and increased the height slightly so it should be at least better now.

@coveralls
Copy link

coveralls commented Jan 12, 2018

Coverage Status

Coverage remained the same at 43.015% when pulling 7f74d21 on bauerj:console-warning into d731df3 on spesmilo:master.

@SomberNight
Copy link
Member

Yep, it fits now in both these cases, thanks. :)

@ecdsa
Copy link
Member

ecdsa commented Feb 27, 2018

do we want the hidden state to be remembered?

@bauerj
Copy link
Member Author

bauerj commented Feb 27, 2018

Not sure about that. The console is seldom used so the benefit wouldn't be big.
But users might forget that they disabled that warning. I'd rather have the warning after every restart.

@dabura667
Copy link
Contributor

No.

People forget.

I don’t mind that Facebook always greets me with a huge DONT PASTE STUFF HERE message.

As long as it doesn’t cover up server banners I say persist for the session until the GUI is closed

@SomberNight
Copy link
Member

@ecdsa Do you mean clicking it once would hide it forever? It's very easy to click it even by mistake.

@dabura667 Well it covers up server banners somewhat (now more than on above screenshots). But I think the behaviour in the PR of "click it once, and it won't be shown until you re-open Electrum" is fine.

@bauerj bauerj modified the milestones: 3.1, 3.2 Mar 7, 2018
@ecdsa ecdsa merged commit 8116b80 into spesmilo:master Jun 26, 2018
@SomberNight SomberNight changed the title Add a warning about harmful code to the console Add a warning about harmful code to the Qt console Feb 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants