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

Bracketed paste mode turned off by mc #3874

Open
mc-butler opened this issue Nov 8, 2017 · 10 comments
Open

Bracketed paste mode turned off by mc #3874

mc-butler opened this issue Nov 8, 2017 · 10 comments
Labels
area: core Issues not related to a specific subsystem prio: high Serious problem that could block progress

Comments

@mc-butler
Copy link

Important

This issue was migrated from Trac:

Origin https://midnight-commander.org/ticket/3874
Reporter nerijus (nerijus@….sourceforge.net)
Mentions egmont (@egmontkob), howaboutsynergy@….me
Keywords paste, wrap

With bash-4.4/readline-7.0 if I put "set enable-bracketed-paste on" in ~/.inputrc, pasting a string with EOLs does not execute it. But with mc there is one problem. If I launch mc, press Ctrl-O and paste, it gets executed. But if I paste again, it does not. Or if I launch mc, press Ctrl-O, press Enter and then paste - it does not paste EOLs too.

@mc-butler
Copy link
Author

Changed by nerijus (nerijus@….sourceforge.net) on Nov 8, 2017 at 13:26 UTC (comment 1)

Created a new ticket by request. The old ticket is #3229.

@mc-butler
Copy link
Author

Changed by nerijus (nerijus@….sourceforge.net) on Nov 8, 2017 at 13:27 UTC (comment 2)

  • Keywords set to paste, wrap

@mc-butler
Copy link
Author

Changed by egmont (@egmontkob) on Nov 8, 2017 at 23:16 UTC (comment 3)

  • Cc set to egmont
  • Description edited

(I'm removing the first three paragraphs of your post, since it's utterly irrelevant, and hence might distract us from the actual problem. It does not matter at all where the text was copied from. The remaining last paragraph on its own is a valid bugreport: if you paste a text which ends in a newline, bracketed paste mode is disregarded.)

@mc-butler
Copy link
Author

Changed by egmont (@egmontkob) on Nov 8, 2017 at 23:25 UTC (comment 4)

  • Priority changed from minor to critical

Bumping the priority to "critical". Devs, please relax on it if you disagree.

Bracketed paste mode, and especially bash supporting it, aims to protect against a certain kind of security problem, namely when the contents of the clipboard unexpectedly differs from what the user believes it is. See e.g. https://bugzilla.gnome.org/show_bug.cgi?id=697571 and also follow the links from there for a couple of examples.

Someone having bash-4.4 with bracketed paste mode enabled would expect to be protected against this kind of attack, and might carelessly copy-paste data from untrusted sources expecting bash to provide sufficient protection.

This expectation is broken by mc, leaving the user in a false sense of security and potentially becoming a victim of such an attack.

@mc-butler
Copy link
Author

Changed by egmont (@egmontkob) on Nov 8, 2017 at 23:26 UTC (comment 5)

  • Summary changed from pasting wrapped line adds EOL to Bracketed paste mode turned off by mc

@mc-butler
Copy link
Author

Changed by zaytsev (@zyv) on Dec 2, 2017 at 10:40 UTC (comment 6)

Well, for me the priority has no relation whatsoever to whether I'd be able to find time to look into it, and if this is the problem I'll look into first whenever I happen to get any spare time :/ My current strategy whenever I get a block of time is to either invest it into issues that are likely to cause a complete meltdown if left unattended for much longer, or issues small & simple enough such that I could actually handle them within this block of time :/

I'm afraid that you're the only one capable and interested in addressing this problem for now anyways...

@mc-butler
Copy link
Author

Changed by egmont (@egmontkob) on Dec 2, 2017 at 19:50 UTC (comment 7)

I didn't mean to urge you or anyone else. Alas, I myself probably won't have any time to look at it any time soon either. But I wanted to note that (in my opinion) this bug is significantly more severe than most other bugs we have here.

[For what it's worth: mc trac's priority levels are truly badly chosen/named. The default is called "major" which name suggests it's more important than the average, the one below is "minor", there's no neutral choice. The default should be a neutrally sounding "normal", with "minor" being below it and "major" being above it. Currently there's no level between the default and "critical". I couldn't express that this bug is more severe than the typical bugs, although probably not yet critical.

Some bugtrackers even distinguish between priority and severity, although I find that a bit of overkill and don't see too much practical use for that. With that model, this bug would be of severity: high or critical, and priority: whatever.]

@mc-butler
Copy link
Author

Changed by zaytsev (@zyv) on Dec 2, 2017 at 22:22 UTC (comment 8)

There are severities on Trac, we just don't use them. If you can tell me what should I rename current "blocker / critical / major / minor / trivial" into that Andrew would agree with, I will do it.

@mc-butler
Copy link
Author

Changed by howaboutsynergy on May 6, 2019 at 9:35 UTC (comment 9)

  • Cc changed from egmont to egmont, howaboutsynergy@….me

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Aug 17, 2019 at 7:20 UTC (comment 10)

Ticket #4003 has been marked as a duplicate of this ticket.

@mc-butler mc-butler marked this as a duplicate of #4003 Feb 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: core Issues not related to a specific subsystem prio: high Serious problem that could block progress
Development

No branches or pull requests

1 participant