2
## 04_CAN-2005-0202.dpatch by <martin.pitt@ubuntu.com>
4
## All lines beginning with `## DP:' are a description of the patch.
7
[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
8
patch_opts="${patch_opts:--f --no-backup-if-mismatch ${2:+-d $2}}"
11
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
15
-patch) patch $patch_opts -p1 < $0;;
16
-unpatch) patch $patch_opts -p1 -R < $0;;
18
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
24
diff -urNad mailman-2.1.5/Mailman/Cgi/private.py /tmp/dpep.URxxJG/mailman-2.1.5/Mailman/Cgi/private.py
25
--- mailman-2.1.5/Mailman/Cgi/private.py 2003-02-08 08:13:50.000000000 +0100
26
+++ /tmp/dpep.URxxJG/mailman-2.1.5/Mailman/Cgi/private.py 2005-02-09 12:49:59.245112000 +0100
30
"Ensure that the path is safe by removing .."
31
- path = path.replace('../', '')
32
- path = path.replace('./', '')
35
+ parts = [x for x in path.split('/') if x not in ('.', '..')]
36
+ return '/'.join(parts)[1:]
39
def guess_type(url, strict):