Bug 410471 - Clipboard applet fails to load in Plasma (and effectively freezes Plasma) when history contains large Javascript
Summary: Clipboard applet fails to load in Plasma (and effectively freezes Plasma) whe...
Status: RESOLVED DUPLICATE of bug 360262
Alias: None
Product: klipper
Classification: Unmaintained
Component: plasma-widget (show other bugs)
Version: 5.12.8
Platform: Kubuntu Linux
: NOR grave
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-07-31 20:22 UTC by Daniel Duris
Modified: 2021-04-01 20:23 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Duris 2019-07-31 20:22:36 UTC
SUMMARY


STEPS TO REPRODUCE
1. Copy huge Javascript into Clipboard applet
2. Kill plasmashell and reload
3. PLasma effectively freezes and won't load, CPU will be on 99+% forever

OBSERVED RESULT
Plasma stuck

EXPECTED RESULT
Plasma loading

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Once clipboard history file (.lst) is deleted via command line, everything works as expected
Comment 1 Daniel Duris 2019-07-31 20:23:27 UTC
This also could be a security issue, but I am not sure, if JS code gets executed or not or why the freeze otherwise happens.
Comment 2 Kai Uwe Broulik 2019-08-01 06:43:11 UTC
How large is that file? I tried with a 7000+ 300 kiB C++ file and cannot reproduce.
Comment 3 Daniel Duris 2019-08-01 08:54:29 UTC
You can download the file here (1.34 MB minified):
https://www.dpdmojkurier.sk/static/js/main.5cfe4e5d.js

CTRL+C

Go to this JS beautifier:
https://beautifier.io/

CTRL+V, beautify, CTRL+C

Now try to open Clipboard to see the history, whole plasma just freezes.

Once I delete the history file:
rm ~/.local/share/klipper/history2.lst

And kill and restart plasma, everything is fine.
Comment 4 Nate Graham 2021-04-01 20:23:36 UTC

*** This bug has been marked as a duplicate of bug 360262 ***