tags 496387 +pending
thanks

Hi,

The attached file is the diff for my wims 3.62-13.1 NMU. The associated
changelog entry is:

 wims (3.62-13.1) unstable; urgency=medium

   * Non-maintainer upload.
   * Prevent against the possibility of an attack with the help of symlinks
     by patching public_html/bin/coqweb and bin/accounts.sh. Patches (and
     patch system) by the regular maintainer. (Closes: #496387)


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      [EMAIL PROTECTED]
       `-
diff -Nru wims-3.62/account.sh.diff wims-3.62/account.sh.diff
--- wims-3.62/account.sh.diff   1970-01-01 01:00:00.000000000 +0100
+++ wims-3.62/account.sh.diff   2008-10-12 21:21:57.000000000 +0100
@@ -0,0 +1,27 @@
+--- account.sh.orig    2008-08-24 23:15:21.000000000 +0200
++++ account.sh 2008-08-24 23:19:57.000000000 +0200
+@@ -77,11 +77,20 @@
+ 
+ # Now referer logs.
+ 
+-cat /tmp/referer-home.log | sort | uniq | grep 'http://' | grep -v 
'wims\.unice\.fr' | sed 's!http://!!g' | awk -F '#' '{print $1}' >>referer.log
+-echo >/tmp/referer-home.log
++############ these following lines were commented because the use of
++############ /tmp based files in a script create a security issue
++############ Besides, there is little indication in the sources that
++############ a file /tmp/referer-home.log shoukd already exist at this point.
++############ so the commented lines were perhaps dead code.
+ 
+-cat referer.log* | grep $workday | awk '{print $3"            "$4}' \
+-      | sort | uniq | sort -k 1 >$tmpdir/acctmp.log
++#cat /tmp/referer-home.log | sort | uniq | grep 'http://' | grep -v 
'wims\.unice\.fr' | sed 's!http://!!g' | awk -F '#' '{print $1}' >>referer.log
++#echo >/tmp/referer-home.log
++
++#cat referer.log* | grep $workday | awk '{print $3"           "$4}' \
++#     | sort | uniq | sort -k 1 >$tmpdir/acctmp.log
++
++############ end of the lines commented out for security reasons
++############ ===================================================
+ 
+ grep -v '??' $tmpdir/acctmp.log >referer/refuniq.log
+ a=`grep -c '??' $tmpdir/acctmp.log`
diff -Nru wims-3.62/coqweb.diff wims-3.62/coqweb.diff
--- wims-3.62/coqweb.diff       1970-01-01 01:00:00.000000000 +0100
+++ wims-3.62/coqweb.diff       2008-10-12 21:21:57.000000000 +0100
@@ -0,0 +1,19 @@
+--- coqweb.orig        2008-08-24 22:57:20.000000000 +0200
++++ coqweb     2008-08-24 22:59:49.000000000 +0200
+@@ -18,10 +18,12 @@
+ if [ "$w_croq6_dbg_level" == "1" ];then
+  echo "[coqweb] called with $* ;;<br/>"
+  echo "<br/>env start <br/>"
+- env >/tmp/env$$
+- sed "s/$/<br\/>/" </tmp/env$$ >/tmp/sed$$
+- cat /tmp/sed$$
+- rm /tmp/env$$ /tmp/sed$$
++ envfile=$(mktemp -t env.XXXXXXXXXX)
++ sedfile=$(mktemp -t sed.XXXXXXXXXX)
++ env > $envfile
++ sed "s/$/<br\/>/" < $envfile > $sedfile
++ cat $sedfile
++ rm $envfile $sedfile
+  echo "<br/>env end"
+  echo "<br/>coqweb start <br/>"
+ fi
diff -Nru wims-3.62/debian/changelog wims-3.62/debian/changelog
--- wims-3.62/debian/changelog  2008-10-12 21:21:56.000000000 +0100
+++ wims-3.62/debian/changelog  2008-10-12 21:21:57.000000000 +0100
@@ -1,3 +1,12 @@
+wims (3.62-13.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Prevent against the possibility of an attack with the help of symlinks by
+    patching public_html/bin/coqweb and bin/accounts.sh. Patches (and patch
+    system) by the regular maintainer. (Closes: #496387)
+
+ -- Chris Lamb <[EMAIL PROTECTED]>  Sun, 12 Oct 2008 21:06:10 +0100
+
 wims (3.62-13) unstable; urgency=low
 
   * reverted the dependency on octave3.0 (the dependency on octave 
diff -Nru wims-3.62/Makefile wims-3.62/Makefile
--- wims-3.62/Makefile  2008-10-12 21:21:56.000000000 +0100
+++ wims-3.62/Makefile  2008-10-12 21:21:57.000000000 +0100
@@ -180,6 +180,10 @@
          cd $${moddir}; \
        done
 
+patch-for-tmpfile-issues:
+       cd wims/public_html/bin; patch < ../../../coqweb.diff
+       cd wims/bin; patch < ../../account.sh.diff
+
 clean-precompiled:
        # remove any precompiled file. The bugs must be reported to Gang XIAO
        for f in $$(find wims/src -type f -perm 755); do \
@@ -198,6 +202,7 @@
        find wims -name ".DS*" -exec rm -f {} \;
         
 patch-and-clean: patch-sources patch-module-manage patch-for-i18n \
+                patch-for-tmpfile-issues \
                 clean-precompiled clean-macos
 
 compile:

Attachment: signature.asc
Description: PGP signature

Reply via email to