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

Sune Vuorela <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit 73ca595582818b72e5a31e322ab21bc5c116c53e by Sune Vuorela.
Committed on 07/08/2026 at 13:56.
Pushed by sune into branch 'release/26.08'.

Block some actions for signature fields

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

(cherry picked from commit dabbbbef2833b2683aaebc9907a31fdc62b0142a)

M  +4    -0    part/formwidgets.cpp

https://invent.kde.org/graphics/okular/-/commit/73ca595582818b72e5a31e322ab21bc5c116c53e

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.