Skip to content

Commit 3e2cd74

Browse files
NGINX teamkolbyjack
authored andcommitted
Changes with nginx 1.1.17 15 Mar 2012
*) Security: content of previously freed memory might be sent to a client if backend returned specially crafted response. Thanks to Matthew Daley. *) Bugfix: in the embedded perl module if used from SSI. Thanks to Matthew Daley. *) Bugfix: in the ngx_http_uwsgi_module.
1 parent 55ebd60 commit 3e2cd74

17 files changed

+141
-90
lines changed

CHANGES

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,23 @@
11

2+
Changes with nginx 1.1.17 15 Mar 2012
3+
4+
*) Security: content of previously freed memory might be sent to a
5+
client if backend returned specially crafted response.
6+
Thanks to Matthew Daley.
7+
8+
*) Bugfix: in the embedded perl module if used from SSI.
9+
Thanks to Matthew Daley.
10+
11+
*) Bugfix: in the ngx_http_uwsgi_module.
12+
13+
214
Changes with nginx 1.1.16 29 Feb 2012
315

416
*) Change: the simultaneous subrequest limit has been raised to 200.
517

618
*) Feature: the "from" parameter of the "disable_symlinks" directive.
719

8-
*) Feature: the "return" and "error_page" directives can be used to
20+
*) Feature: the "return" and "error_page" directives can now be used to
921
return 307 redirections.
1022

1123
*) Bugfix: a segmentation fault might occur in a worker process if the
@@ -45,13 +57,14 @@ Changes with nginx 1.1.15 15 Feb 2012
4557
*) Bugfix: nginx could not be built with the ngx_http_perl_module if the
4658
--with-openssl option was used.
4759

48-
*) Bugfix: internal redirects to named locations were not limited.
60+
*) Bugfix: the number of internal redirects to named locations was not
61+
limited.
4962

5063
*) Bugfix: calling $r->flush() multiple times might cause errors in the
5164
ngx_http_gzip_filter_module.
5265

5366
*) Bugfix: temporary files might be not removed if the "proxy_store"
54-
directive were used with SSI includes.
67+
directive was used with SSI includes.
5568

5669
*) Bugfix: in some cases non-cacheable variables (such as the $args
5770
variable) returned old empty cached value.
@@ -72,8 +85,8 @@ Changes with nginx 1.1.14 30 Jan 2012
7285

7386
*) Bugfix: in the OpenSSL library initialization.
7487

75-
*) Bugfix: the "proxy_redirect" directives might not be correctly
76-
inherited.
88+
*) Bugfix: the "proxy_redirect" directives might be inherited
89+
incorrectly.
7790

7891
*) Bugfix: memory leak during reconfiguration if the "pcre_jit"
7992
directive was used.

CHANGES.ru

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,16 @@
11

2+
Изменения в nginx 1.1.17 15.03.2012
3+
4+
*) Безопасность: содержимое ранее освобождённой памяти могло быть
5+
отправлено клиенту, если бэкенд возвращал специально созданный ответ.
6+
Спасибо Matthew Daley.
7+
8+
*) Исправление: при использовании встроенного перла из SSI.
9+
Спасибо Matthew Daley.
10+
11+
*) Исправление: в модуле ngx_http_uwsgi_module.
12+
13+
214
Изменения в nginx 1.1.16 29.02.2012
315

416
*) Изменение: ограничение на количество одновременных подзапросов

man/nginx.8

Lines changed: 49 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -25,33 +25,30 @@
2525
.\" SUCH DAMAGE.
2626
.\"
2727
.\"
28-
.Dd August 10, 2011
28+
.Dd March 6, 2012
2929
.Dt NGINX 8
3030
.Os
3131
.Sh NAME
3232
.Nm nginx
3333
.Nd "HTTP and reverse proxy server, mail proxy server"
3434
.Sh SYNOPSIS
3535
.Nm
36-
.Op Fl hqtvV?
36+
.Op Fl ?hqtVv
3737
.Op Fl c Ar file
3838
.Op Fl g Ar directives
3939
.Op Fl p Ar prefix
4040
.Op Fl s Ar signal
4141
.Sh DESCRIPTION
42-
The
4342
.Nm
44-
(spelled
43+
(pronounced
4544
.Dq engine x )
4645
is an HTTP and reverse proxy server, as well as a mail proxy server.
47-
The
48-
.Nm
49-
is known for its high performance, stability, rich feature set, simple
46+
It is known for its high performance, stability, rich feature set, simple
5047
configuration, and low resource consumption.
5148
.Pp
5249
The options are as follows:
5350
.Bl -tag -width ".Fl d Ar directives"
54-
.It Fl ?\& | h
51+
.It Fl ?\& , h
5552
Print help.
5653
.It Fl c Ar file
5754
Use an alternative configuration
@@ -62,20 +59,20 @@ See
6259
.Sx EXAMPLES
6360
for details.
6461
.It Fl p Ar prefix
65-
Set prefix path.
66-
Default value is
62+
Set the prefix path.
63+
The default value is
6764
.Pa %%PREFIX%% .
6865
.It Fl q
6966
Suppress non-error messages during configuration testing.
7067
.It Fl s Ar signal
71-
Send signal to the master process.
68+
Send a signal to the master process.
7269
The argument
7370
.Ar signal
7471
can be one of:
7572
.Cm stop , quit , reopen , reload .
76-
The following table shows the corresponding system signals.
73+
The following table shows the corresponding system signals:
7774
.Pp
78-
.Bl -tag -width ".It Cm reopen" -compact
75+
.Bl -tag -width ".Cm reopen" -compact
7976
.It Cm stop
8077
.Dv SIGTERM
8178
.It Cm quit
@@ -86,49 +83,48 @@ The following table shows the corresponding system signals.
8683
.Dv SIGHUP
8784
.El
8885
.It Fl t
89-
Don't run, just test the configuration file.
90-
The
86+
Do not run, just test the configuration file.
9187
.Nm
92-
checks configuration for correct syntax and then tries to open files
93-
referred in configuration.
94-
.It Fl v
95-
Print
96-
.Nm
97-
version.
88+
checks the configuration file syntax and then tries to open files
89+
referenced in the configuration file.
9890
.It Fl V
99-
Print
91+
Print the
10092
.Nm
101-
version, compiler version and
93+
version, compiler version, and
10294
.Pa configure
10395
script parameters.
96+
.It Fl v
97+
Print the
98+
.Nm
99+
version.
104100
.El
105101
.Sh SIGNALS
106102
The master process of
107103
.Nm
108-
can handle the following signals.
104+
can handle the following signals:
109105
.Pp
110-
.Bl -tag -width ".It Dv SIGINT , SIGTERM" -compact
106+
.Bl -tag -width ".Dv SIGINT , SIGTERM" -compact
111107
.It Dv SIGINT , SIGTERM
112108
Shut down quickly.
113109
.It Dv SIGHUP
114110
Reload configuration, start the new worker process with a new
115-
configuration, gracefully shut down old worker processes.
111+
configuration, and gracefully shut down old worker processes.
116112
.It Dv SIGQUIT
117113
Shut down gracefully.
118114
.It Dv SIGUSR1
119115
Reopen log files.
120116
.It Dv SIGUSR2
121-
Upgrade
117+
Upgrade the
122118
.Nm
123119
executable on the fly.
124120
.It Dv SIGWINCH
125-
Shut down gracefully worker processes.
121+
Shut down worker processes gracefully.
126122
.El
127123
.Pp
128-
While there's no need to explicitly control worker processes normally,
129-
they support some signals, too:
124+
While there is no need to explicitly control worker processes normally,
125+
they support some signals too:
130126
.Pp
131-
.Bl -tag -width ".It Dv SIGINT , SIGTERM" -compact
127+
.Bl -tag -width ".Dv SIGINT , SIGTERM" -compact
132128
.It Dv SIGTERM
133129
Shut down quickly.
134130
.It Dv SIGQUIT
@@ -150,40 +146,44 @@ level of the
150146
.Pp
151147
.Dl "error_log /path/to/log debug;"
152148
.Pp
153-
It is also possible to enable the debugging for some IP address:
149+
It is also possible to enable the debugging for a particular IP address:
154150
.Bd -literal -offset indent
155151
events {
156152
debug_connection 127.0.0.1;
157153
}
158154
.Ed
155+
.Sh ENVIRONMENT
156+
The
157+
.Ev NGINX
158+
environment variable is used internally by
159+
.Nm
160+
and should not be set directly by the user.
159161
.Sh FILES
160-
.Bl -tag -width indent -compact
162+
.Bl -tag -width indent
161163
.It Pa %%PID_PATH%%
162-
Contains the process ID of the
163-
.Nm
164-
listening for connections.
165-
The content of this file is not sensitive; it can be world-readable.
164+
Contains the process ID of
165+
.Nm .
166+
The contents of this file are not sensitive, so it can be world-readable.
166167
.It Pa %%CONF_PATH%%
167-
Main configuration file.
168+
The main configuration file.
168169
.It Pa %%ERROR_LOG_PATH%%
169170
Error log file.
170171
.El
171172
.Sh EXIT STATUS
172173
Exit status is 0 on success, or 1 if the command fails.
173174
.Sh EXAMPLES
174-
.Bd -literal
175-
nginx -t -c ~/mynginx.conf -g "pid /var/run/mynginx.pid; worker_processes 2;"
176-
.Ed
177175
Test configuration file
178176
.Pa ~/mynginx.conf
179-
with global directives for PID and quantity of worker processes.
177+
with global directives for PID and quantity of worker processes:
178+
.Bd -literal -offset indent
179+
nginx -t -c ~/mynginx.conf \e
180+
-g "pid /var/run/mynginx.pid; worker_processes 2;"
181+
.Ed
180182
.Sh SEE ALSO
181183
.\"Xr nginx.conf 5
182184
.\"Pp
183185
Documentation at
184-
.Pa http://nginx.org/
185-
and
186-
.Pa http://sysoev.ru/nginx/ .
186+
.Pa http://nginx.org/en/docs/ .
187187
.Pp
188188
For questions and technical support, please refer to
189189
.Pa http://nginx.org/en/support.html .
@@ -193,10 +193,10 @@ Development of
193193
started in 2002, with the first public release on October 4, 2004.
194194
.Sh AUTHORS
195195
.An -nosplit
196-
.An Igor Sysoev Aq igor@sysoev.ru
196+
.An Igor Sysoev Aq igor@sysoev.ru .
197197
.Pp
198-
This manual page was written by
198+
This manual page was originally written by
199199
.An Sergey A. Osokin Aq osa@FreeBSD.org.ru
200-
as a result of compilation of many
200+
as a result of compiling many
201201
.Nm
202-
documents all over the world.
202+
documents from all over the world.

src/core/nginx.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
#define _NGINX_H_INCLUDED_
1010

1111

12-
#define nginx_version 1001016
13-
#define NGINX_VERSION "1.1.16"
12+
#define nginx_version 1001017
13+
#define NGINX_VERSION "1.1.17"
1414
#define NGINX_VER "nginx/" NGINX_VERSION
1515

1616
#define NGINX_VAR "NGINX"

src/core/ngx_connection.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ ngx_configure_listening_sockets(ngx_cycle_t *cycle)
514514
}
515515
}
516516

517-
#if (NGX_HAVE_KEEPALIVE_TUNABLE)
517+
#if (NGX_HAVE_KEEPALIVE_TUNABLE)
518518

519519
if (ls[i].keepidle) {
520520
if (setsockopt(ls[i].fd, IPPROTO_TCP, TCP_KEEPIDLE,

src/event/ngx_event_openssl.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -478,6 +478,7 @@ ngx_ssl_dhparam(ngx_conf_t *cf, ngx_ssl_t *ssl, ngx_str_t *file)
478478
return NGX_OK;
479479
}
480480

481+
481482
ngx_int_t
482483
ngx_ssl_ecdh_curve(ngx_conf_t *cf, ngx_ssl_t *ssl, ngx_str_t *name)
483484
{
@@ -518,6 +519,7 @@ ngx_ssl_ecdh_curve(ngx_conf_t *cf, ngx_ssl_t *ssl, ngx_str_t *name)
518519
return NGX_OK;
519520
}
520521

522+
521523
ngx_int_t
522524
ngx_ssl_create_connection(ngx_ssl_t *ssl, ngx_connection_t *c, ngx_uint_t flags)
523525
{

src/http/modules/ngx_http_fastcgi_module.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1501,10 +1501,10 @@ ngx_http_fastcgi_process_header(ngx_http_request_t *r)
15011501
h->lowcase_key = h->key.data + h->key.len + 1
15021502
+ h->value.len + 1;
15031503

1504-
ngx_cpystrn(h->key.data, r->header_name_start,
1505-
h->key.len + 1);
1506-
ngx_cpystrn(h->value.data, r->header_start,
1507-
h->value.len + 1);
1504+
ngx_memcpy(h->key.data, r->header_name_start, h->key.len);
1505+
h->key.data[h->key.len] = '\0';
1506+
ngx_memcpy(h->value.data, r->header_start, h->value.len);
1507+
h->value.data[h->value.len] = '\0';
15081508
}
15091509

15101510
h->hash = r->header_hash;
@@ -2432,7 +2432,8 @@ ngx_http_fastcgi_merge_params(ngx_conf_t *cf,
24322432

24332433
if (prev->headers_hash.buckets
24342434
#if (NGX_HTTP_CACHE)
2435-
&& ((conf->upstream.cache == NULL) == (prev->upstream.cache == NULL))
2435+
&& ((conf->upstream.cache == NULL)
2436+
== (prev->upstream.cache == NULL))
24362437
#endif
24372438
)
24382439
{

src/http/modules/ngx_http_proxy_module.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1381,8 +1381,10 @@ ngx_http_proxy_process_header(ngx_http_request_t *r)
13811381
h->value.data = h->key.data + h->key.len + 1;
13821382
h->lowcase_key = h->key.data + h->key.len + 1 + h->value.len + 1;
13831383

1384-
ngx_cpystrn(h->key.data, r->header_name_start, h->key.len + 1);
1385-
ngx_cpystrn(h->value.data, r->header_start, h->value.len + 1);
1384+
ngx_memcpy(h->key.data, r->header_name_start, h->key.len);
1385+
h->key.data[h->key.len] = '\0';
1386+
ngx_memcpy(h->value.data, r->header_start, h->value.len);
1387+
h->value.data[h->value.len] = '\0';
13861388

13871389
if (h->key.len == r->lowcase_index) {
13881390
ngx_memcpy(h->lowcase_key, r->lowcase_header, h->key.len);

src/http/modules/ngx_http_scgi_module.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -941,8 +941,10 @@ ngx_http_scgi_process_header(ngx_http_request_t *r)
941941
h->value.data = h->key.data + h->key.len + 1;
942942
h->lowcase_key = h->key.data + h->key.len + 1 + h->value.len + 1;
943943

944-
ngx_cpystrn(h->key.data, r->header_name_start, h->key.len + 1);
945-
ngx_cpystrn(h->value.data, r->header_start, h->value.len + 1);
944+
ngx_memcpy(h->key.data, r->header_name_start, h->key.len);
945+
h->key.data[h->key.len] = '\0';
946+
ngx_memcpy(h->value.data, r->header_start, h->value.len);
947+
h->value.data[h->value.len] = '\0';
946948

947949
if (h->key.len == r->lowcase_index) {
948950
ngx_memcpy(h->lowcase_key, r->lowcase_header, h->key.len);
@@ -1384,7 +1386,8 @@ ngx_http_scgi_merge_params(ngx_conf_t *cf, ngx_http_scgi_loc_conf_t *conf,
13841386

13851387
if (prev->headers_hash.buckets
13861388
#if (NGX_HTTP_CACHE)
1387-
&& ((conf->upstream.cache == NULL) == (prev->upstream.cache == NULL))
1389+
&& ((conf->upstream.cache == NULL)
1390+
== (prev->upstream.cache == NULL))
13881391
#endif
13891392
)
13901393
{

0 commit comments

Comments
 (0)