[graphics/okular] part: Block some actions for signature fields

Sune Vuorela <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit dabbbbef2833b2683aaebc9907a31fdc62b0142a by Sune Vuorela.
Committed on 07/08/2026 at 12:30.
Pushed by sune into branch 'master'.

Block some actions for signature fields

There is a theoretical possibility that a malicious actor can do funny
things with documents

M  +4    -0    part/formwidgets.cpp

https://invent.kde.org/graphics/okular/-/commit/dabbbbef2833b2683aaebc9907a31fdc62b0142a

diff --git a/part/formwidgets.cpp b/part/formwidgets.cpp
index 8a81a3a75..546fbae8f 100644
--- a/part/formwidgets.cpp
+++ b/part/formwidgets.cpp
@@ -79,6 +79,10 @@ void FormWidgetsController::signalAction(Okular::Action *a)
 
 void FormWidgetsController::signalMouseAction(Okular::Action *action, Okular::FormField *form, Okular::Document::MouseEventType fieldMouseEventType)
 {
+    if ((action->actionType() == Okular::Action::Script || action->actionType() == Okular::Action::BackendOpaque) && form->type() == Okular::FormField::FormSignature) {
+        qWarning() << "blocking certain actions for signature field";
+        return;
+    }
     Q_EMIT mouseAction(action, form, fieldMouseEventType);
 }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.