2592:e079c44a8340 | 08-Nov-2023 |
Andrei Zeliankou |
Tests: 8XXX used as default port range.
After the launch of the project, the testing infrastructure was shared with nginx project in some cases. To avoid port overlap, a decision was made to shift
Tests: 8XXX used as default port range.
After the launch of the project, the testing infrastructure was shared with nginx project in some cases. To avoid port overlap, a decision was made to shift the port range for Unit tests. This problem was resolved a long time ago and is no longer relevant, so it is now safe to use port 8XXX range as the default, as it is more appropriate for testing purposes.
show more ...
|
2591:c31330e61c3f | 08-Nov-2023 |
Andrei Zeliankou |
Var: simplified length calculation for $status variable. |
2590:909122130e06 | 08-Nov-2023 |
Andrei Zeliankou |
Var: $request_id variable.
This variable contains a string that is formed using random data and can be used as a unique request identifier.
This closes #714 issue on GitHub. |
2589:4fd775fdbd4c | 02-Nov-2023 |
Zhidao HONG |
Removed trailing 0 from debug message in nxt_credential_get(). |
2588:a7cd214faa6e | 26-Oct-2023 |
Andrei Zeliankou |
Version bump. |
2587:e7dd8edd563a | 25-Oct-2023 |
Alejandro Colomar |
.mailmap: updated address for Alex.
Signed-off-by: Alejandro Colomar <alx@kernel.org> Signed-off-by: Andrew Clayton <a.clayton@nginx.com> |
Revision tags: 1.31.1-1 |
|
2585:310a391970d5 | 18-Oct-2023 |
Ippolitov Igor |
Merged with the default branch. |
2584:c89368877b1a | 19-Oct-2023 |
Andrei Zeliankou |
Unit 1.31.1 release. |
Revision tags: 1.31.1 |
|
2583:25aafe2ff61e | 17-Oct-2023 |
Andrei Zeliankou |
Generated Dockerfiles for Unit 1.31.1. |
2582:116521bd30b4 | 19-Oct-2023 |
Andrei Zeliankou |
Added version 1.31.1 CHANGES. |
2581:1de18845c5eb | 19-Oct-2023 |
Andrei Zeliankou |
Edited changes.xml for the 1.31.1 release. |
2580:13e1309e1cde | 19-Oct-2023 |
Andrei Zeliankou |
Prepearing for 1.31.1 release. |
2579:9c2fd2342ecb | 18-Oct-2023 |
Liam Crilly |
Tools: unitc remote mode edit fix.
Previously, the edit method created a temporary file that was then sent to curl(1) as --data-binary @filename.tmp. This did not work with remote instances because
Tools: unitc remote mode edit fix.
Previously, the edit method created a temporary file that was then sent to curl(1) as --data-binary @filename.tmp. This did not work with remote instances because the temporary file is not on the remote host. The edit method now passes the configuration to curl(1) using stdin, the same way as for all other configuration changes.
show more ...
|
2578:4abe14ad5581 | 17-Oct-2023 |
Sergey A. Osokin |
Update third-party components for the Java module. |
2577:4700c7f0c043 | 13-Oct-2023 |
Konstantin Pavlov |
contrib: updated njs to 0.8.1. |
2576:61599584950b | 26-Sep-2023 |
Konstantin Pavlov |
Node.js: provide reasonable default paths for macOS. |
2575:27e184a2ad23 | 16-Oct-2023 |
Liam Crilly |
Tools: unitc Docker mode.
Introduces a new remote host scheme docker:// that specifies a local container ID. By default, the control socket is assumed to be in the default location, as per the Docke
Tools: unitc Docker mode.
Introduces a new remote host scheme docker:// that specifies a local container ID. By default, the control socket is assumed to be in the default location, as per the Docker Official Images for Unit. If not, the path to the control socket can be appended to the container ID.
show more ...
|
2574:98b67e77114c | 11-Oct-2023 |
Andrei Zeliankou |
Tests: added PHP test with rewrite and query string.
This test reproduces https://github.com/nginx/unit/issues/964. |
2573:438271da6ff4 | 11-Oct-2023 |
Andrei Zeliankou |
Rewrite and response headers mentioned in OpenAPI. |
2572:9e0c72fe7acd | 27-Sep-2023 |
Andrew Clayton |
Wasm: Re-add a removed 'const' qualifier in nxt_rt_wasmtime.c.
This was inadvertently removed in 76086d6d ("Wasm: Allow to set the HTTP response status.")
Fixes: 76086d6d ("Wasm: Allow to set the H
Wasm: Re-add a removed 'const' qualifier in nxt_rt_wasmtime.c.
This was inadvertently removed in 76086d6d ("Wasm: Allow to set the HTTP response status.")
Fixes: 76086d6d ("Wasm: Allow to set the HTTP response status.") Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
show more ...
|
2571:59a0b60a5cdb | 10-Oct-2023 |
Sergey A. Osokin |
Update third-party components for the Java module. |
2570:b9686295b0f2 | 10-Oct-2023 |
Liam Crilly |
Tools: unitc YAML mode.
Added --format option to manage configuration in other formats. Initially, YAML is the only supported conversion format. JSON/YAML conversion is performed with yq(1).
Sugges
Tools: unitc YAML mode.
Added --format option to manage configuration in other formats. Initially, YAML is the only supported conversion format. JSON/YAML conversion is performed with yq(1).
Suggested by: Torstein Krause Johansen <https://github.com/skybert> Closes: #958 <https://github.com/nginx/unit/issues/958>
show more ...
|
2569:942a1e97492a | 10-Oct-2023 |
Zhidao HONG |
Refactored nxt_vsprintf(). |
2568:117ca233e225 | 06-Oct-2023 |
Sergey A. Osokin |
Update third-party components for the Java module. |
2567:31a8f342d32a | 04-Oct-2023 |
Andrew Clayton |
HTTP: Fix URL with query string rewrite.
On Github, @rlandgrebe reported an issue when trying to rewrite URLs that contained query strings.
With the PHP language module we were in fact segfaulting
HTTP: Fix URL with query string rewrite.
On Github, @rlandgrebe reported an issue when trying to rewrite URLs that contained query strings.
With the PHP language module we were in fact segfaulting (SIGSEGV) in libphp
[93960.462952] unitd[20940]: segfault at 7f307cef6476 ip 00007f2f81a94577 sp 00007fff28a777d0 error 4 in libphp-8.2.so[7f2f818df000+2fd000] likely on CPU 0 (core 0, socket 0)
#0 0x00007f2abd494577 in php_default_treat_data (arg=1, str=0x0, destArray=<optimized out>) at /usr/src/debug/php-8.2.10-1.fc38.x86_64/main/php_variables.c:488 488 if (c_var && *c_var) { (gdb) p c_var $1 = 0x7f2bb8880676 <error: Cannot access memory at address 0x7f2bb8880676>
This was when trying to get the query string which somehow is pointing off into the woods.
This gdb debug session when doing rewrite basically shows the core of the issue
(gdb) x /64bs req->fields ... 0x7f7eaaaa8090: "GET" 0x7f7eaaaa8094: "HTTP/1.1" 0x7f7eaaaa809d: "::1" 0x7f7eaaaa80a1: "::1" 0x7f7eaaaa80a5: "8080" 0x7f7eaaaa80aa: "localhost" 0x7f7eaaaa80b4: "/test?q=a" 0x7f7eaaaa80be: "/test" ...
(gdb) p target_pos $4 = (void *) 0x7f7eaaaa80b4
(gdb) p query_pos $6 = (void *) 0x7f7eaaaa6af6
(gdb) p r->args->start $8 = (u_char *) 0x7f7ea4002b02 "q=a HTTP/1.1\r\nHost: localhost:8080\r\nUser-Agent: curl/8.0.1\r\nAccept: */*\r\n\r\n" (gdb) p r->target.start $9 = (u_char *) 0x7f7ea40040c0 "/test?q=a"
That last address, 0x7f7ea40040c0, looks out of wack, it should be smaller than r->args->start.
That results in a calculation in nxt_router_prepare_msg()
if (r->args->start != NULL) { query_pos = nxt_pointer_to(target_pos, r->args->start - r->target.start);
nxt_unit_sptr_set(&req->query, query_pos);
} else {
that goes negative that then is stored in req->query.offset which is a uint32_t and so wraps backwards from UINT_MAX to give us an offset of a little under 4GiB, hence the above invalid memory access.
All this happens due to in nxt_http_rewrite() if we have a URL with a query string, we create a new memory allocation to store the transformed URL and query string.
We set r->target to point to this new allocation, but we also need to point r->args->start to the start of the query string in this new allocation.
Reported-by: René Landgrebe <https://github.com/rlandgrebe> Tested-by: René Landgrebe <https://github.com/rlandgrebe> Tested-by: Liam Crilly <liam.crilly@nginx.com> Fixes: 14d6d97b ("HTTP: added basic URI rewrite.") Closes: <https://github.com/nginx/unit/issues/964> Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
show more ...
|