Commit afbe0f1a1 for imagemagick.org
commit afbe0f1a1801f15b61188396c3a6f6fb843eb4b4
Author: Cristy <urban-warrior@imagemagick.org>
Date: Thu Feb 5 10:11:22 2026 -0500
correct glob expression
diff --git a/config/policy-secure.xml b/config/policy-secure.xml
index 87b20334f..4f2199699 100644
--- a/config/policy-secure.xml
+++ b/config/policy-secure.xml
@@ -94,7 +94,7 @@
<!-- don't read sensitive paths. -->
<policy domain="path" rights="none" pattern="/etc/*"/>
<!-- Relative paths are not permitted. -->
- <policy domain="path" rights="none" pattern="\.\.\/"/>
+ <policy domain="path" rights="none" pattern="*../*"/>
<!-- Indirect reads are not permitted. -->
<policy domain="path" rights="none" pattern="@*"/>
<!-- These image types are security risks on read, but write is fine -->
diff --git a/config/policy-websafe.xml b/config/policy-websafe.xml
index 48eca735d..d0a44bf8d 100644
--- a/config/policy-websafe.xml
+++ b/config/policy-websafe.xml
@@ -90,7 +90,7 @@
<!-- don't read sensitive paths. -->
<policy domain="path" rights="none" pattern="/etc/*"/>
<!-- Relative paths are not permitted. -->
- <policy domain="path" rights="none" pattern="\.\.\/"/>
+ <policy domain="path" rights="none" pattern="*../*"/>
<!-- Indirect reads are not permitted. -->
<policy domain="path" rights="none" pattern="@*"/>
<!-- Deny all image modules and specifically exempt reading or writing