[nginx-site] Documented xml_external_entities directive.

Maxim Dounin mdounin at mdounin.ru
Sun Nov 9 10:14:31 UTC 2025


details:   http://freenginx.org/hg/nginx-site/rev/9af0065a1b69
branches:  
changeset: 3122:9af0065a1b69
user:      Maxim Dounin <mdounin at mdounin.ru>
date:      Sun Nov 09 13:14:10 2025 +0300
description:
Documented xml_external_entities directive.

diffstat:

 xml/en/docs/http/ngx_http_xslt_module.xml |  32 ++++++++++++++++++++++++++++++-
 xml/ru/docs/http/ngx_http_xslt_module.xml |  32 ++++++++++++++++++++++++++++++-
 2 files changed, 62 insertions(+), 2 deletions(-)

diffs (98 lines):

diff --git a/xml/en/docs/http/ngx_http_xslt_module.xml b/xml/en/docs/http/ngx_http_xslt_module.xml
--- a/xml/en/docs/http/ngx_http_xslt_module.xml
+++ b/xml/en/docs/http/ngx_http_xslt_module.xml
@@ -10,7 +10,7 @@
 <module name="Module ngx_http_xslt_module"
         link="/en/docs/http/ngx_http_xslt_module.html"
         lang="en"
-        rev="3">
+        rev="4">
 
 <section id="summary">
 
@@ -73,6 +73,36 @@ It is enough to declare just the require
 </directive>
 
 
+<directive name="xml_external_entities">
+<syntax><literal>on</literal> | <literal>off</literal></syntax>
+<default>off</default>
+<context>http</context>
+<context>server</context>
+<context>location</context>
+<appeared-in>1.29.3</appeared-in>
+
+<para>
+Enables loading of external character entities
+declared in the internal DTD subset,
+that is, in the processed XML document itself.
+</para>
+
+<para>
+By default, loading of external entities
+declared in the internal DTD subset
+is disabled since version 1.29.3.
+Loading can be enabled with this directive,
+but it should be kept in mind that this makes it possible to
+access all local files readable by the worker process.
+</para>
+
+<para>
+Only loading of file-based external entities is supported.
+</para>
+
+</directive>
+
+
 <directive name="xslt_last_modified">
 <syntax><literal>on</literal> | <literal>off</literal></syntax>
 <default>off</default>
diff --git a/xml/ru/docs/http/ngx_http_xslt_module.xml b/xml/ru/docs/http/ngx_http_xslt_module.xml
--- a/xml/ru/docs/http/ngx_http_xslt_module.xml
+++ b/xml/ru/docs/http/ngx_http_xslt_module.xml
@@ -10,7 +10,7 @@
 <module name="Модуль ngx_http_xslt_module"
         link="/ru/docs/http/ngx_http_xslt_module.html"
         lang="ru"
-        rev="3">
+        rev="4">
 
 <section id="summary">
 
@@ -73,6 +73,36 @@ location / {
 </directive>
 
 
+<directive name="xml_external_entities">
+<syntax><literal>on</literal> | <literal>off</literal></syntax>
+<default>off</default>
+<context>http</context>
+<context>server</context>
+<context>location</context>
+<appeared-in>1.29.3</appeared-in>
+
+<para>
+Разрешает загрузку внешних символьных сущностей,
+объявленных во внутреннем подмножестве DTD,
+то есть непосредственно в обрабатываемом XML-документе.
+</para>
+
+<para>
+По умолчанию загрузка внешних сущностей,
+объявленных во внутреннем подмножестве DTD,
+запрещена начиная с версии 1.29.3.
+Загрузка может быть разрешена с помощью данной директивы,
+но следует учитывать, что это делает возможным
+чтение любых локальных файлов, доступных рабочему процессу.
+</para>
+
+<para>
+Поддерживается только загрузка внешних сущностей из файлов.
+</para>
+
+</directive>
+
+
 <directive name="xslt_last_modified">
 <syntax><literal>on</literal> | <literal>off</literal></syntax>
 <default>off</default>


More information about the nginx-devel mailing list