summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornginx <nginx@nginx.org>2013-10-08 13:20:53 +0000
committerJon Kolb <jon@b0g.us>2013-10-08 13:20:53 +0000
commit660a81f910f1911f418c8550d6c83a355903d9bc (patch)
tree89ab3ca4047524f99189d99b471cef4c15cd9d9e
parente11452c2e0b93111df75a5bd3fa61c237048ae35 (diff)
downloadnginx-660a81f910f1911f418c8550d6c83a355903d9bc.tar.gz
Changes with nginx 1.4.3 08 Oct 2013v1.4.3
*) Bugfix: a segmentation fault might occur in a worker process if the ngx_http_spdy_module was used with the "client_body_in_file_only" directive. *) Bugfix: a segmentation fault might occur on start or during reconfiguration if the "try_files" directive was used with an empty parameter. *) Bugfix: the $request_time variable did not work in nginx/Windows. *) Bugfix: in the ngx_http_auth_basic_module when using "$apr1$" password encryption method. Thanks to Markus Linnala. *) Bugfix: in the ngx_http_autoindex_module. *) Bugfix: in the mail proxy server.
-rw-r--r--CHANGES21
-rw-r--r--CHANGES.ru21
-rw-r--r--src/core/nginx.h4
-rw-r--r--src/core/ngx_crypt.c2
-rw-r--r--src/http/modules/ngx_http_autoindex_module.c6
-rw-r--r--src/http/modules/ngx_http_log_module.c2
-rw-r--r--src/http/ngx_http_core_module.c4
-rw-r--r--src/http/ngx_http_spdy.c11
-rw-r--r--src/http/ngx_http_variables.c2
-rw-r--r--src/mail/ngx_mail_smtp_module.c1
-rw-r--r--src/mail/ngx_mail_ssl_module.c5
-rw-r--r--src/os/unix/ngx_errno.h2
12 files changed, 61 insertions, 20 deletions
diff --git a/CHANGES b/CHANGES
index bbc3eb931..a35c22b90 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,4 +1,25 @@
+Changes with nginx 1.4.3 08 Oct 2013
+
+ *) Bugfix: a segmentation fault might occur in a worker process if the
+ ngx_http_spdy_module was used with the "client_body_in_file_only"
+ directive.
+
+ *) Bugfix: a segmentation fault might occur on start or during
+ reconfiguration if the "try_files" directive was used with an empty
+ parameter.
+
+ *) Bugfix: the $request_time variable did not work in nginx/Windows.
+
+ *) Bugfix: in the ngx_http_auth_basic_module when using "$apr1$"
+ password encryption method.
+ Thanks to Markus Linnala.
+
+ *) Bugfix: in the ngx_http_autoindex_module.
+
+ *) Bugfix: in the mail proxy server.
+
+
Changes with nginx 1.4.2 17 Jul 2013
*) Bugfix: the $r->header_in() embedded perl method did not return value
diff --git a/CHANGES.ru b/CHANGES.ru
index 18f1371c3..34af0e8dd 100644
--- a/CHANGES.ru
+++ b/CHANGES.ru
@@ -1,4 +1,25 @@
+Изменения в nginx 1.4.3 08.10.2013
+
+ *) Исправление: в рабочем процессе мог произойти segmentation fault,
+ если использовался модуль ngx_http_spdy_module и директива
+ client_body_in_file_only.
+
+ *) Исправление: на старте или во время переконфигурации мог произойти
+ segmentation fault, если использовалась директива try_files с пустым
+ параметром.
+
+ *) Исправление: переменная $request_time не работала в nginx/Windows.
+
+ *) Исправление: в модуле ngx_http_auth_basic_module при использовании
+ метода шифрования паролей "$apr1$".
+ Спасибо Markus Linnala.
+
+ *) Исправление: в модуле ngx_http_autoindex_module.
+
+ *) Исправление: в почтовом прокси-сервере.
+
+
Изменения в nginx 1.4.2 17.07.2013
*) Исправление: метод $r->header_in() встроенного перла не возвращал
diff --git a/src/core/nginx.h b/src/core/nginx.h
index b1107adea..2ce21ae19 100644
--- a/src/core/nginx.h
+++ b/src/core/nginx.h
@@ -9,8 +9,8 @@
#define _NGINX_H_INCLUDED_
-#define nginx_version 1004002
-#define NGINX_VERSION "1.4.2"
+#define nginx_version 1004003
+#define NGINX_VERSION "1.4.3"
#define NGINX_VER "nginx/" NGINX_VERSION
#define NGINX_VAR "NGINX"
diff --git a/src/core/ngx_crypt.c b/src/core/ngx_crypt.c
index 629d160e8..e2376c6f1 100644
--- a/src/core/ngx_crypt.c
+++ b/src/core/ngx_crypt.c
@@ -137,7 +137,7 @@ ngx_crypt_apr1(ngx_pool_t *pool, u_char *key, u_char *salt, u_char **encrypted)
/* output */
- *encrypted = ngx_pnalloc(pool, sizeof("$apr1$") - 1 + saltlen + 16 + 1);
+ *encrypted = ngx_pnalloc(pool, sizeof("$apr1$") - 1 + saltlen + 1 + 22 + 1);
if (*encrypted == NULL) {
return NGX_ERROR;
}
diff --git a/src/http/modules/ngx_http_autoindex_module.c b/src/http/modules/ngx_http_autoindex_module.c
index fb46d65d1..1eecfbe68 100644
--- a/src/http/modules/ngx_http_autoindex_module.c
+++ b/src/http/modules/ngx_http_autoindex_module.c
@@ -304,7 +304,7 @@ ngx_http_autoindex_handler(ngx_http_request_t *r)
if (ngx_de_info(filename, &dir) == NGX_FILE_ERROR) {
err = ngx_errno;
- if (err != NGX_ENOENT) {
+ if (err != NGX_ENOENT && err != NGX_ELOOP) {
ngx_log_error(NGX_LOG_CRIT, r->connection->log, err,
ngx_de_info_n " \"%s\" failed", filename);
@@ -388,7 +388,7 @@ ngx_http_autoindex_handler(ngx_http_request_t *r)
b = ngx_create_temp_buf(r->pool, len);
if (b == NULL) {
- return NGX_HTTP_INTERNAL_SERVER_ERROR;
+ return NGX_ERROR;
}
if (entries.nelts > 1) {
@@ -649,7 +649,7 @@ ngx_http_autoindex_error(ngx_http_request_t *r, ngx_dir_t *dir, ngx_str_t *name)
ngx_close_dir_n " \"%V\" failed", name);
}
- return NGX_HTTP_INTERNAL_SERVER_ERROR;
+ return r->header_sent ? NGX_ERROR : NGX_HTTP_INTERNAL_SERVER_ERROR;
}
diff --git a/src/http/modules/ngx_http_log_module.c b/src/http/modules/ngx_http_log_module.c
index aa6a3fcee..7eb29b38a 100644
--- a/src/http/modules/ngx_http_log_module.c
+++ b/src/http/modules/ngx_http_log_module.c
@@ -780,7 +780,7 @@ ngx_http_log_request_time(ngx_http_request_t *r, u_char *buf,
((tp->sec - r->start_sec) * 1000 + (tp->msec - r->start_msec));
ms = ngx_max(ms, 0);
- return ngx_sprintf(buf, "%T.%03M", ms / 1000, ms % 1000);
+ return ngx_sprintf(buf, "%T.%03M", (time_t) ms / 1000, ms % 1000);
}
diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c
index 25d3dc97d..f2c3adeff 100644
--- a/src/http/ngx_http_core_module.c
+++ b/src/http/ngx_http_core_module.c
@@ -4758,7 +4758,9 @@ ngx_http_core_try_files(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
tf[i].name = value[i + 1];
- if (tf[i].name.data[tf[i].name.len - 1] == '/') {
+ if (tf[i].name.len > 0
+ && tf[i].name.data[tf[i].name.len - 1] == '/')
+ {
tf[i].test_dir = 1;
tf[i].name.len--;
tf[i].name.data[tf[i].name.len] = '\0';
diff --git a/src/http/ngx_http_spdy.c b/src/http/ngx_http_spdy.c
index 3febc23e9..7c93dc49a 100644
--- a/src/http/ngx_http_spdy.c
+++ b/src/http/ngx_http_spdy.c
@@ -2529,13 +2529,6 @@ ngx_http_spdy_init_request_body(ngx_http_request_t *r)
return NGX_ERROR;
}
- if (rb->rest == 0) {
- buf->in_file = 1;
- buf->file = &tf->file;
- } else {
- rb->buf = buf;
- }
-
} else {
if (rb->rest == 0) {
@@ -2546,10 +2539,10 @@ ngx_http_spdy_init_request_body(ngx_http_request_t *r)
if (buf == NULL) {
return NGX_ERROR;
}
-
- rb->buf = buf;
}
+ rb->buf = buf;
+
rb->bufs = ngx_alloc_chain_link(r->pool);
if (rb->bufs == NULL) {
return NGX_ERROR;
diff --git a/src/http/ngx_http_variables.c b/src/http/ngx_http_variables.c
index 6f1e0344d..7a7d15c1e 100644
--- a/src/http/ngx_http_variables.c
+++ b/src/http/ngx_http_variables.c
@@ -1988,7 +1988,7 @@ ngx_http_variable_request_time(ngx_http_request_t *r,
((tp->sec - r->start_sec) * 1000 + (tp->msec - r->start_msec));
ms = ngx_max(ms, 0);
- v->len = ngx_sprintf(p, "%T.%03M", ms / 1000, ms % 1000) - p;
+ v->len = ngx_sprintf(p, "%T.%03M", (time_t) ms / 1000, ms % 1000) - p;
v->valid = 1;
v->no_cacheable = 0;
v->not_found = 0;
diff --git a/src/mail/ngx_mail_smtp_module.c b/src/mail/ngx_mail_smtp_module.c
index cdd4e5eb1..02bbf1fb9 100644
--- a/src/mail/ngx_mail_smtp_module.c
+++ b/src/mail/ngx_mail_smtp_module.c
@@ -277,7 +277,6 @@ ngx_mail_smtp_merge_srv_conf(ngx_conf_t *cf, void *parent, void *child)
p = ngx_cpymem(p, conf->capability.data, conf->capability.len);
p = ngx_cpymem(p, "250 STARTTLS" CRLF, sizeof("250 STARTTLS" CRLF) - 1);
- *p++ = CR; *p = LF;
p = conf->starttls_capability.data
+ (last - conf->capability.data) + 3;
diff --git a/src/mail/ngx_mail_ssl_module.c b/src/mail/ngx_mail_ssl_module.c
index dd6f2ac41..60e7a9a88 100644
--- a/src/mail/ngx_mail_ssl_module.c
+++ b/src/mail/ngx_mail_ssl_module.c
@@ -235,6 +235,11 @@ ngx_mail_ssl_merge_conf(ngx_conf_t *cf, void *parent, void *child)
mode = "";
}
+ if (conf->file == NULL) {
+ conf->file = prev->file;
+ conf->line = prev->line;
+ }
+
if (*mode) {
if (conf->certificate.len == 0) {
diff --git a/src/os/unix/ngx_errno.h b/src/os/unix/ngx_errno.h
index 125087e78..1497c5f2f 100644
--- a/src/os/unix/ngx_errno.h
+++ b/src/os/unix/ngx_errno.h
@@ -49,10 +49,10 @@ typedef int ngx_err_t;
#define NGX_ECANCELED ECANCELED
#define NGX_EILSEQ EILSEQ
#define NGX_ENOMOREFILES 0
+#define NGX_ELOOP ELOOP
#if (NGX_HAVE_OPENAT)
#define NGX_EMLINK EMLINK
-#define NGX_ELOOP ELOOP
#endif
#if (__hpux__)