Welcome! Log In Create A New Profile

Advanced

[nginx] Xslt: fixed parameters parsing (ticket #1416).

November 16, 2017 05:26AM
details: http://hg.nginx.org/nginx/rev/595a3de03e91
branches:
changeset: 7154:595a3de03e91
user: Ruslan Ermilov <ru@nginx.com>
date: Thu Nov 16 13:20:47 2017 +0300
description:
Xslt: fixed parameters parsing (ticket #1416).

If parameters were specified in xslt_stylesheet without variables,
any request except the first would cause an internal server error.

diffstat:

src/http/modules/ngx_http_xslt_filter_module.c | 15 +++++++++++++--
1 files changed, 13 insertions(+), 2 deletions(-)

diffs (25 lines):

diff -r 32f83fe5747b -r 595a3de03e91 src/http/modules/ngx_http_xslt_filter_module.c
--- a/src/http/modules/ngx_http_xslt_filter_module.c Fri Oct 27 00:30:38 2017 +0800
+++ b/src/http/modules/ngx_http_xslt_filter_module.c Thu Nov 16 13:20:47 2017 +0300
@@ -686,8 +686,19 @@ ngx_http_xslt_params(ngx_http_request_t
* specified in xslt_stylesheet directives
*/

- p = string.data;
- last = string.data + string.len;
+ if (param[i].value.lengths) {
+ p = string.data;
+
+ } else {
+ p = ngx_pnalloc(r->pool, string.len + 1);
+ if (p == NULL) {
+ return NGX_ERROR;
+ }
+
+ ngx_memcpy(p, string.data, string.len + 1);
+ }
+
+ last = p + string.len;

while (p && *p) {

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[nginx] Xslt: fixed parameters parsing (ticket #1416).

ru@nginx.com 790 November 16, 2017 05:26AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 146
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready