Welcome! Log In Create A New Profile

Advanced

[nginx] Limit req: don't truncate key value to 255 bytes.

Valentin Bartenev
September 17, 2014 04:10AM
details: http://hg.nginx.org/nginx/rev/cda4fcb9294c
branches:
changeset: 5846:cda4fcb9294c
user: Valentin Bartenev <vbart@nginx.com>
date: Tue Sep 16 21:12:51 2014 +0400
description:
Limit req: don't truncate key value to 255 bytes.

While the module allows to use values up to 65535 bytes as a key,
that actually never worked properly.

diffstat:

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

diffs (12 lines):

diff -r 40b24cfef18b -r cda4fcb9294c src/http/modules/ngx_http_limit_req_module.c
--- a/src/http/modules/ngx_http_limit_req_module.c Wed Sep 17 12:04:47 2014 +0400
+++ b/src/http/modules/ngx_http_limit_req_module.c Tue Sep 16 21:12:51 2014 +0400
@@ -461,7 +461,7 @@ ngx_http_limit_req_lookup(ngx_http_limit

lr = (ngx_http_limit_req_node_t *) &node->color;

- lr->len = (u_char) len;
+ lr->len = (u_short) len;
lr->excess = 0;

ngx_memcpy(lr->data, data, len);

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

[nginx] Limit req: don't truncate key value to 255 bytes.

Valentin Bartenev 552 September 17, 2014 04:10AM



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

Online Users

Guests: 153
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready