Created
October 21, 2023 07:15
-
-
Save rokibhasansagar/696a5755d726a3aadd0ddbf040adf3d8 to your computer and use it in GitHub Desktop.
policy.xml file for ImageMagick7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE policymap [ | |
<!ELEMENT policymap (policy)*> | |
<!ATTLIST policymap xmlns CDATA #FIXED ''> | |
<!ELEMENT policy EMPTY> | |
<!ATTLIST policy xmlns CDATA #FIXED '' domain NMTOKEN #REQUIRED | |
name NMTOKEN #IMPLIED pattern CDATA #IMPLIED rights NMTOKEN #IMPLIED | |
stealth NMTOKEN #IMPLIED value CDATA #IMPLIED> | |
]> | |
<!-- | |
Configure ImageMagick policies. | |
Domains include system, delegate, coder, filter, path, or resource. | |
Use a glob expression as a pattern. | |
Define arguments for the memory, map, area, width, height and disk resources | |
with SI prefixes (.e.g 100MB). In addition, resource policies are maximums | |
for each instance of ImageMagick (e.g. policy memory limit 1GB, -limit 2GB | |
exceeds policy maximum so memory limit is 1GB). | |
--> | |
<policymap> | |
<policy domain="resource" name="temporary-path" value="/tmp"/> | |
<policy domain="resource" name="memory" value="2GiB"/> | |
<policy domain="resource" name="map" value="4GiB"/> | |
<policy domain="resource" name="width" value="20KP"/> | |
<policy domain="resource" name="height" value="40KP"/> | |
<!-- <policy domain="resource" name="list-length" value="128"/> --> | |
<policy domain="resource" name="area" value="512MP"/> | |
<policy domain="resource" name="disk" value="8EiB"/> | |
<!-- <policy domain="resource" name="file" value="768"/> --> | |
<!-- <policy domain="resource" name="thread" value="4"/> --> | |
<!-- <policy domain="resource" name="throttle" value="0"/> --> | |
<!-- <policy domain="resource" name="time" value="3600"/> --> | |
<!-- <policy domain="coder" rights="none" pattern="MVG" /> --> | |
<!-- <policy domain="module" rights="none" pattern="{PS,PDF,XPS}" /> --> | |
<!-- <policy domain="delegate" rights="none" pattern="HTTPS" /> --> | |
<!-- <policy domain="path" rights="none" pattern="@*" /> --> | |
<!-- <policy domain="cache" name="memory-map" value="anonymous"/> --> | |
<!-- <policy domain="cache" name="synchronize" value="True"/> --> | |
<!-- <policy domain="cache" name="shared-secret" value="passphrase" stealth="true"/> --> | |
<policy domain="system" name="max-memory-request" value="1GiB"/> | |
<!-- <policy domain="cache" name="synchronize" value="true"/> --> | |
<!-- <policy domain="system" name="shred" value="1"/> --> | |
<policy domain="Undefined" rights="none"/> | |
</policymap> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment