diff options
author | E. Westbrook <github@westbrook.io> | 2018-08-21 09:07:42 -0600 |
---|---|---|
committer | E. Westbrook <github@westbrook.io> | 2018-08-21 09:07:42 -0600 |
commit | c570a32c219c957fd405ed018f2500f06952c043 (patch) | |
tree | 0b477575f2a63946a49f04296c91e246da7d2ec9 /test/urltest.lua | |
parent | c905b5d44f8cdfbc8110a9a7d1d62c08b5703ae3 (diff) | |
download | luasocket-c570a32c219c957fd405ed018f2500f06952c043.tar.gz luasocket-c570a32c219c957fd405ed018f2500f06952c043.tar.bz2 luasocket-c570a32c219c957fd405ed018f2500f06952c043.zip |
url.lua:remove_dot_components(): limit beginning-of-string double-dot corner case to prevent triple-dot activation and authority collision
Diffstat (limited to 'test/urltest.lua')
-rw-r--r-- | test/urltest.lua | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/test/urltest.lua b/test/urltest.lua index 649be88..8664fa6 100644 --- a/test/urltest.lua +++ b/test/urltest.lua | |||
@@ -685,6 +685,7 @@ check_absolute_url("a/b/c/d/../", "d/e/f", "a/b/c/d/e/f") | |||
685 | check_absolute_url("http://velox.telemar.com.br", "/dashboard/index.html", | 685 | check_absolute_url("http://velox.telemar.com.br", "/dashboard/index.html", |
686 | "http://velox.telemar.com.br/dashboard/index.html") | 686 | "http://velox.telemar.com.br/dashboard/index.html") |
687 | check_absolute_url("http://example.com/", "../.badhost.com/", "http://example.com/.badhost.com/") | 687 | check_absolute_url("http://example.com/", "../.badhost.com/", "http://example.com/.badhost.com/") |
688 | check_absolute_url("http://example.com/", "...badhost.com/", "http://example.com/...badhost.com/") | ||
688 | 689 | ||
689 | print("testing path parsing and composition") | 690 | print("testing path parsing and composition") |
690 | check_parse_path("/eu/tu/ele", { "eu", "tu", "ele"; is_absolute = 1 }) | 691 | check_parse_path("/eu/tu/ele", { "eu", "tu", "ele"; is_absolute = 1 }) |