[Pkg-ocaml-maint-commits] [SCM] mldonkey packaging branch, lenny, updated. debian/2.9.5-2-6-g31c6f3f
Mehdi Dogguy
dogguy at pps.jussieu.fr
Wed Mar 11 10:47:43 UTC 2009
The following commit has been merged in the lenny branch:
commit 31c6f3f845f819a99cce65b1d45331fd5a9c67a5
Author: Mehdi Dogguy <dogguy at pps.jussieu.fr>
Date: Wed Mar 11 11:01:30 2009 +0100
Updating the patch
diff --git a/debian/patches/url.dpatch b/debian/patches/url.dpatch
index 8b6979e..35d4792 100755
--- a/debian/patches/url.dpatch
+++ b/debian/patches/url.dpatch
@@ -1,13 +1,60 @@
#! /bin/sh /usr/share/dpatch/dpatch-run
## url.dpatch by Mehdi Dogguy <dogguy at pps.jussieu.fr>
##
-## DP: Fix double slash vulnerability.
+## DP: Fix double slash vulnerability and prevent from downloading
+## DP: downloads.ini and other files.
## DP: See: https://savannah.nongnu.org/bugs/?25667
@DPATCH@
+diff -urNad mldonkey~/src/daemon/driver/driverControlers.ml mldonkey/src/daemon/driver/driverControlers.ml
+--- mldonkey~/src/daemon/driver/driverControlers.ml 2009-03-10 21:13:48.000000000 +0100
++++ mldonkey/src/daemon/driver/driverControlers.ml 2009-03-11 10:46:40.000000000 +0100
+@@ -816,16 +816,23 @@
+ else
+ try
+ File.to_string filename
+- with _ ->
+- try
+- Hashtbl.find CommonPictures.files filename
+- with Not_found ->
+- try
+- if String.sub filename 0 4 = "flag" then
+- Hashtbl.find CommonPictures.files "flag_--.png"
+- else
+- raise Not_found
+- with _ -> raise Not_found
++ with _ -> raise Not_found
++ in
++ let ext = extension_to_file_ext (Filename2.last_extension2 filename) in
++ http_add_bin_header r ext (String.length file_to_send);
++ Buffer.add_string buf file_to_send
++
++let http_send_bin_pictures r buf filename =
++ let file_to_send =
++ try
++ Hashtbl.find CommonPictures.files filename
++ with Not_found ->
++ try
++ if String.sub filename 0 4 = "flag" then
++ Hashtbl.find CommonPictures.files "flag_--.png"
++ else
++ raise Not_found
++ with _ -> raise Not_found
+ in
+ let ext = extension_to_file_ext (Filename2.last_extension2 filename) in
+ http_add_bin_header r ext (String.length file_to_send);
+@@ -1501,7 +1508,7 @@
+ read_theme_page this_page else
+ if !!html_mods then !!CommonMessages.download_html_js_mods0
+ else !!CommonMessages.download_html_js_old)
+- | s -> http_send_bin r buf (String.lowercase s)
++ | s -> http_send_bin_pictures r buf (String.lowercase s)
+ with
+ | Not_found ->
+ let _, error_text_long, header = Http_server.error_page "404" "" ""
diff -urNad mldonkey~/src/utils/lib/url.ml mldonkey/src/utils/lib/url.ml
---- mldonkey~/src/utils/lib/url.ml 2009-02-25 15:11:06.000000000 +0100
-+++ mldonkey/src/utils/lib/url.ml 2009-02-25 15:13:33.000000000 +0100
+--- mldonkey~/src/utils/lib/url.ml 2009-03-10 21:13:48.000000000 +0100
++++ mldonkey/src/utils/lib/url.ml 2009-03-11 10:40:50.000000000 +0100
@@ -175,6 +175,20 @@
Buffer.contents res
--
mldonkey packaging
More information about the Pkg-ocaml-maint-commits
mailing list