On Sun, Oct 11, 2026 at 10:18:25PM +0200, Pavel Sanda wrote:
> We'll see, updated patches below ;)

One more from the same family.

Pavel
>From 1290168c6d5f8c1223aa8443a5e6bff68c614c61 Mon Sep 17 00:00:00 2001
From: Pavel Sanda <[email protected]>
Date: Sun, 11 Oct 2026 23:21:40 +0200
Subject: [PATCH] lyxpaperview: pass -- safeguard

Nothing executes through this: plocate has no option that runs a
command, but paths could be steered via --database.

Tier 01 DiD / cit-search: -- separator for the lyxpaperview search pattern

Assisted-by: Claude Opus 5
---
 lib/scripts/lyxpaperview.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/scripts/lyxpaperview.py b/lib/scripts/lyxpaperview.py
index 3e40a630d7..f7623f6f5a 100755
--- a/lib/scripts/lyxpaperview.py
+++ b/lib/scripts/lyxpaperview.py
@@ -60,13 +60,13 @@ def find(args, path):
     if os.name != 'nt':
         # use locate if possible (faster)
         if find_exe(['locate']):
-            p1 = subprocess.Popen(['locate', '-i', args[0].lower()], stdout=subprocess.PIPE)
-            px = subprocess.Popen(['grep', '-Ei', r'\.pdf$|\.ps$'], stdin=p1.stdout, stdout=subprocess.PIPE)
+            p1 = subprocess.Popen(['locate', '-i', '--', args[0].lower()], stdout=subprocess.PIPE)
+            px = subprocess.Popen(['grep', '-Ei', '--', r'\.pdf$|\.ps$'], stdin=p1.stdout, stdout=subprocess.PIPE)
             for arg in args:
                if arg == args[0]:
                    # have this already
                    continue
-               px = subprocess.Popen(['grep', '-i', arg], stdin=px.stdout, stdout=subprocess.PIPE)
+               px = subprocess.Popen(['grep', '-i', '--', arg], stdin=px.stdout, stdout=subprocess.PIPE)
             p1.stdout.close()
             output = px.communicate()
             return output[0].decode("utf8").strip('\n')
-- 
2.39.5

-- 
lyx-devel mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-devel

Reply via email to