Welcome! Log In Create A New Profile

Advanced

[njs] Tests: adapting unsafe redirect test for QuickJS.

Anonymous User
July 25, 2024 08:58PM
details: https://github.com/nginx/njs/commit/3ac496802862347c5cf8f0b6e3825163dc7bb1c9
branches: master
commit: 3ac496802862347c5cf8f0b6e3825163dc7bb1c9
user: Dmitry Volyntsev <xeioex@nginx.com>
date: Thu, 25 Jul 2024 17:28:37 -0700
description:
Tests: adapting unsafe redirect test for QuickJS.

At the moment QuickJS has no API for getting strings
with NUL characters in the middle of the string.

Instead of a NUL byte make another unsafe redirect URI.

---
nginx/t/js_internal_redirect.t | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/nginx/t/js_internal_redirect.t b/nginx/t/js_internal_redirect.t
index ec6be4e1..abfe79f9 100644
--- a/nginx/t/js_internal_redirect.t
+++ b/nginx/t/js_internal_redirect.t
@@ -72,7 +72,7 @@ $t->write_file('test.js', <<EOF);
r.internalRedirect('\@named');

} else if (r.variables.arg_unsafe) {
- r.internalRedirect('/red\0rect');
+ r.internalRedirect('/red/../rect');

} else if (r.variables.arg_quoted) {
r.internalRedirect('/red%69rect');
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
https://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[njs] Tests: adapting unsafe redirect test for QuickJS.

Anonymous User 214 July 25, 2024 08:58PM



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

Online Users

Guests: 246
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready