Latest update - 9280 (1.27.1)
This commit is contained in:
+2
-2
@@ -9,8 +9,8 @@
|
||||
#define _NGINX_H_INCLUDED_
|
||||
|
||||
|
||||
#define nginx_version 1027000
|
||||
#define NGINX_VERSION "1.27.0"
|
||||
#define nginx_version 1027001
|
||||
#define NGINX_VERSION "1.27.1"
|
||||
#define NGINX_VER "nginx/" NGINX_VERSION " by Hakase"
|
||||
|
||||
#ifndef NGINX_SERVER
|
||||
|
||||
@@ -1022,6 +1022,16 @@ ngx_quic_handle_payload(ngx_connection_t *c, ngx_quic_header_t *pkt)
|
||||
}
|
||||
}
|
||||
|
||||
if (pkt->level == ssl_encryption_application) {
|
||||
/*
|
||||
* RFC 9001, 4.9.3. Discarding 0-RTT Keys
|
||||
*
|
||||
* After receiving a 1-RTT packet, servers MUST discard
|
||||
* 0-RTT keys within a short time
|
||||
*/
|
||||
ngx_quic_discard_ctx(c, ssl_encryption_early_data);
|
||||
}
|
||||
|
||||
if (qc->closing) {
|
||||
/*
|
||||
* RFC 9000, 10.2. Immediate Close
|
||||
|
||||
@@ -743,8 +743,15 @@ ngx_quic_keys_discard(ngx_quic_keys_t *keys,
|
||||
ngx_quic_crypto_hp_cleanup(client);
|
||||
ngx_quic_crypto_hp_cleanup(server);
|
||||
|
||||
ngx_explicit_memzero(client->secret.data, client->secret.len);
|
||||
ngx_explicit_memzero(server->secret.data, server->secret.len);
|
||||
if (client->secret.len) {
|
||||
ngx_explicit_memzero(client->secret.data, client->secret.len);
|
||||
client->secret.len = 0;
|
||||
}
|
||||
|
||||
if (server->secret.len) {
|
||||
ngx_explicit_memzero(server->secret.data, server->secret.len);
|
||||
server->secret.len = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -844,6 +851,9 @@ ngx_quic_keys_update(ngx_event_t *ev)
|
||||
ngx_explicit_memzero(current->server.secret.data,
|
||||
current->server.secret.len);
|
||||
|
||||
current->client.secret.len = 0;
|
||||
current->server.secret.len = 0;
|
||||
|
||||
ngx_explicit_memzero(client_key.data, client_key.len);
|
||||
ngx_explicit_memzero(server_key.data, server_key.len);
|
||||
|
||||
@@ -870,10 +880,17 @@ ngx_quic_keys_cleanup(ngx_quic_keys_t *keys)
|
||||
ngx_quic_crypto_cleanup(&next->client);
|
||||
ngx_quic_crypto_cleanup(&next->server);
|
||||
|
||||
ngx_explicit_memzero(next->client.secret.data,
|
||||
next->client.secret.len);
|
||||
ngx_explicit_memzero(next->server.secret.data,
|
||||
next->server.secret.len);
|
||||
if (next->client.secret.len) {
|
||||
ngx_explicit_memzero(next->client.secret.data,
|
||||
next->client.secret.len);
|
||||
next->client.secret.len = 0;
|
||||
}
|
||||
|
||||
if (next->server.secret.len) {
|
||||
ngx_explicit_memzero(next->server.secret.data,
|
||||
next->server.secret.len);
|
||||
next->server.secret.len = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -3099,7 +3099,8 @@ static ngx_int_t
|
||||
ngx_http_mp4_crop_stsc_data(ngx_http_mp4_file_t *mp4,
|
||||
ngx_http_mp4_trak_t *trak, ngx_uint_t start)
|
||||
{
|
||||
uint32_t start_sample, chunk, samples, id, next_chunk, n,
|
||||
uint64_t n;
|
||||
uint32_t start_sample, chunk, samples, id, next_chunk,
|
||||
prev_samples;
|
||||
ngx_buf_t *data, *buf;
|
||||
ngx_uint_t entries, target_chunk, chunk_samples;
|
||||
@@ -3155,12 +3156,19 @@ ngx_http_mp4_crop_stsc_data(ngx_http_mp4_file_t *mp4,
|
||||
|
||||
next_chunk = ngx_mp4_get_32value(entry->chunk);
|
||||
|
||||
if (next_chunk < chunk) {
|
||||
ngx_log_error(NGX_LOG_ERR, mp4->file.log, 0,
|
||||
"unordered mp4 stsc chunks in \"%s\"",
|
||||
mp4->file.name.data);
|
||||
return NGX_ERROR;
|
||||
}
|
||||
|
||||
ngx_log_debug5(NGX_LOG_DEBUG_HTTP, mp4->file.log, 0,
|
||||
"sample:%uD, chunk:%uD, chunks:%uD, "
|
||||
"samples:%uD, id:%uD",
|
||||
start_sample, chunk, next_chunk - chunk, samples, id);
|
||||
|
||||
n = (next_chunk - chunk) * samples;
|
||||
n = (uint64_t) (next_chunk - chunk) * samples;
|
||||
|
||||
if (start_sample < n) {
|
||||
goto found;
|
||||
@@ -3182,7 +3190,7 @@ ngx_http_mp4_crop_stsc_data(ngx_http_mp4_file_t *mp4,
|
||||
"sample:%uD, chunk:%uD, chunks:%uD, samples:%uD",
|
||||
start_sample, chunk, next_chunk - chunk, samples);
|
||||
|
||||
n = (next_chunk - chunk) * samples;
|
||||
n = (uint64_t) (next_chunk - chunk) * samples;
|
||||
|
||||
if (start_sample > n) {
|
||||
ngx_log_error(NGX_LOG_ERR, mp4->file.log, 0,
|
||||
|
||||
@@ -294,6 +294,11 @@ ngx_http_v2_init(ngx_event_t *rev)
|
||||
|
||||
c->data = h2c;
|
||||
|
||||
if (ngx_exiting) {
|
||||
ngx_http_v2_finalize_connection(h2c, NGX_HTTP_V2_NO_ERROR);
|
||||
return;
|
||||
}
|
||||
|
||||
rev->handler = ngx_http_v2_read_handler;
|
||||
c->write->handler = ngx_http_v2_write_handler;
|
||||
|
||||
|
||||
@@ -519,7 +519,7 @@ ngx_stream_ssl_preread_servername(ngx_stream_session_t *s,
|
||||
|
||||
host = *servername;
|
||||
|
||||
rc = ngx_stream_validate_host(&host, c->pool, 1);
|
||||
rc = ngx_stream_validate_host(&host, c->pool, 0);
|
||||
|
||||
if (rc == NGX_ERROR) {
|
||||
return NGX_ERROR;
|
||||
|
||||
Reference in New Issue
Block a user