Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F161614029
D57074.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D57074.diff
View Options
diff --git a/usr.bin/tftp/tests/tftp_test.sh b/usr.bin/tftp/tests/tftp_test.sh
--- a/usr.bin/tftp/tests/tftp_test.sh
+++ b/usr.bin/tftp/tests/tftp_test.sh
@@ -442,6 +442,29 @@
stop_tftpd
}
+atf_test_case tftp_url_long cleanup
+tftp_url_long_head() {
+ atf_set "descr" "Very long URL"
+ atf_set "require.user" "root"
+}
+tftp_url_long_body() {
+ start_tftpd
+ mkdir "${tftp_dir}/subdirectory"
+ local remote_file="${tftp_dir}/hello.txt"
+ echo "Hello, $$!" >"${remote_file}"
+ local local_file="${remote_file##*/}"
+ local d="subdirectory/../"
+ d="${d}${d}${d}${d}${d}${d}${d}${d}"
+ d="${d}${d}${d}${d}${d}${d}${d}${d}"
+ d="${d}${d}${d}${d}${d}${d}${d}${d}"
+ atf_check -s exit:1 -o match:"Illegal TFTP operation" \
+ tftp "tftp://localhost/${d}${remote_file##*/}"
+ atf_check -s exit:1 test -f "${local_file}"
+}
+tftp_url_long_cleanup() {
+ stop_tftpd
+}
+
atf_init_test_cases() {
atf_add_test_case tftp_get_big
atf_add_test_case tftp_get_host
@@ -462,4 +485,5 @@
atf_add_test_case tftp_url_host
atf_add_test_case tftp_url_ipv4
atf_add_test_case tftp_url_ipv6
+ atf_add_test_case tftp_url_long
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Jul 6, 7:56 AM (13 h, 38 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33328968
Default Alt Text
D57074.diff (1 KB)
Attached To
Mode
D57074: tftp: Add test case with over-long URL
Attached
Detach File
Event Timeline
Log In to Comment