[Popcon-developers] Bug#850568: Bug#850568: popularity-contest: popcon-largest-unused tries to read encrypted log

Bill Allombert ballombe at debian.org
Sat Jan 14 15:45:58 UTC 2017


On Sat, Jan 07, 2017 at 10:24:54PM +0100, Celelibi wrote:
> Package: popularity-contest
> Version: 1.64
> Severity: normal
> 
> Dear maintainer,
> 
> I'm not sure when this happened, but it looks like the statistics
> gathered by popularity-contest are not encrypted before sending them
> online.
> 
> However, the tool popcon-largest-unused (provided by this package) try
> to read this file as if it were not encrypted.

This is a bug I introduced in this commit.

commit ddbc31169e3e17e9621c3e0538174b335c6bc7e6
Author: Bill Allombert <Bill.Allombert at math.u-bordeaux1.fr>
Date:   Thu Jul 10 15:37:36 2014 +0200

    debian/cron.daily: Only update /var/log/popcon if submission was
successful

> I may suggest that popcon-largest-unused reads from
> /var/log/popularity-contest.new, which is the unencrypted last file.

I do not think this is correct: /var/log/popularity-contest.new should
only exist when the submission fails.

The attached patch (to appy to /etc/cron.daily/popularity-contest)
should fix this bug.

Thanks for using popularity-contest!
-- 
Bill. <ballombe at debian.org>

Imagine a large red swirl here. 
-------------- next part --------------
diff --git a/debian/cron.daily b/debian/cron.daily
index a3a92ef..2ca6903 100644
--- a/debian/cron.daily
+++ b/debian/cron.daily
@@ -38,7 +38,8 @@ if [ -n "$HTTP_PROXY" ]; then
 fi
 
 POPCONOLD=/var/log/popularity-contest
-POPCON=/var/log/popularity-contest.new
+POPCONNEW=/var/log/popularity-contest.new
+POPCON="$POPCONNEW"
 
 # Only run on the given day, to spread the load on the server a bit
 if [ "$DAY" ] && [ "$DAY" != "$(date +%w)" ] ; then
@@ -140,5 +141,5 @@ fi
 if [ "yes" != "$SUBMITTED" ] ; then
 	logger -t popularity-contest "unable to submit report."
 else
-	mv $POPCON $POPCONOLD
+	mv $POPCONNEW $POPCONOLD
 fi


More information about the Popcon-developers mailing list