From steve at steve.org.uk Wed Sep 9 21:00:10 2009 From: steve at steve.org.uk (Steve Kemp) Date: Wed, 9 Sep 2009 12:00:10 +0100 Subject: Is there a specific security contact address? Message-ID: <20090909110010.GA3183@steve.org.uk> Hi, Is there a canonical point of contact for reporting security issues in the planet code? I have an issue affecting both planet 2.0 and the Venus codebase, and I'd rather not disclose publicly if that can be avoided. Steve -- Debian GNU/Linux System Administration http://www.debian-administration.org/ From mary at puzzling.org Wed Sep 9 21:03:33 2009 From: mary at puzzling.org (Mary Gardiner) Date: Wed, 9 Sep 2009 21:03:33 +1000 Subject: Is there a specific security contact address? In-Reply-To: <20090909110010.GA3183@steve.org.uk> References: <20090909110010.GA3183@steve.org.uk> Message-ID: <20090909110333.GH6009@gertrude.home.puzzling.org> On Wed, Sep 09, 2009, Steve Kemp wrote: > I have an issue affecting both planet 2.0 and the > Venus codebase, and I'd rather not disclose publicly > if that can be avoided. Contact Jeff Waugh for Planet 2.0 and Sam Ruby for Venus. -Mary From steve at steve.org.uk Wed Sep 9 21:18:57 2009 From: steve at steve.org.uk (Steve Kemp) Date: Wed, 9 Sep 2009 12:18:57 +0100 Subject: Is there a specific security contact address? In-Reply-To: <20090909110333.GH6009@gertrude.home.puzzling.org> References: <20090909110010.GA3183@steve.org.uk> <20090909110333.GH6009@gertrude.home.puzzling.org> Message-ID: <20090909111856.GB7926@steve.org.uk> On Wed Sep 09, 2009 at 21:03:33 +1000, Mary Gardiner wrote: > Contact Jeff Waugh for Planet 2.0 and Sam Ruby for Venus. Thanks - I've done that now. Steve -- From rubys at intertwingly.net Thu Sep 10 01:35:29 2009 From: rubys at intertwingly.net (Sam Ruby) Date: Wed, 09 Sep 2009 11:35:29 -0400 Subject: New version available [was: Is there a specific security contact address?] In-Reply-To: <20090909110010.GA3183@steve.org.uk> References: <20090909110010.GA3183@steve.org.uk> Message-ID: <4AA7CB41.7050005@intertwingly.net> Steve Kemp wrote: > Hi, > > Is there a canonical point of contact for > reporting security issues in the planet code? > > I have an issue affecting both planet 2.0 and the > Venus codebase, and I'd rather not disclose publicly > if that can be avoided. I've pushed out a new version of Venus: http://www.intertwingly.net/code/venus/ Here's a description of the changes: http://intertwingly.net/blog/2009/09/09/Venus-Updates Hopefully Steve can verify that this fixes the vulnerability that he detected. > Steve > -- > Debian GNU/Linux System Administration > http://www.debian-administration.org/ - Sam Ruby From lars at matholka.se Thu Sep 10 21:40:37 2009 From: lars at matholka.se (Lars Ljung) Date: Thu, 10 Sep 2009 13:40:37 +0200 Subject: Patch: Add and tags to feeds Message-ID: <4AA8E5B5.5040209@matholka.se> Hi, I needed to add and tags to my Atom and RSS feeds. Here is a patch that adds an "icon" configuration setting (it should be an URL). Regards, Lars Ljung === modified file 'planet/config.py' --- planet/config.py 2007-08-20 02:13:00 +0000 +++ planet/config.py 2009-09-10 08:11:39 +0000 @@ -106,6 +106,8 @@ define_planet('output_dir', 'output') define_planet('spider_threads', 0) + define_planet('logo', None) + define_planet_int('new_feed_items', 0) define_planet_int('feed_timeout', 20) define_planet_int('cache_keep_entries', 10) === modified file 'planet/splice.py' --- planet/splice.py 2007-06-15 16:22:54 +0000 +++ planet/splice.py 2009-09-10 08:11:39 +0000 @@ -35,6 +35,9 @@ createTextElement(author, 'email', config.owner_email()) feed.appendChild(author) + if config.logo(): + createTextElement(feed, 'logo', config.logo()) + if config.feed(): createTextElement(feed, 'id', config.feed()) link = doc.createElement('link') === modified file 'themes/common/rss20.xml.tmpl' --- themes/common/rss20.xml.tmpl 2006-10-19 02:38:39 +0000 +++ themes/common/rss20.xml.tmpl 2009-09-10 11:27:58 +0000 @@ -6,6 +6,13 @@ en - + + + <TMPL_VAR name ESCAPE="HTML"> + + + + From lars at matholka.se Thu Sep 10 22:44:55 2009 From: lars at matholka.se (Lars Ljung) Date: Thu, 10 Sep 2009 14:44:55 +0200 Subject: Patch: Display localized time and date with htmltmpl Message-ID: <4AA8F4C7.3020600@matholka.se> Hi, It doesn't make much sense to display English dates and UTC time on a Swedish web page. So I patched the code to use the system locale and timezone. This works for me. But the locale and timezone settings are global and might affect other parts of the code. Most calls to strftime() seems to be safe though (I took care of Rfc822()). It's ugly to call locale.setlocale() from tmpl.py, I know. Regards, Lars Ljung === modified file 'planet/shell/tmpl.py' --- planet/shell/tmpl.py 2009-01-09 08:11:16 +0000 +++ planet/shell/tmpl.py 2009-09-10 12:40:59 +0000 @@ -2,10 +2,15 @@ import sgmllib, time, os, sys, new, urlparse, re from planet import config, feedparser import htmltmpl +import locale, calendar voids=feedparser._BaseHTMLProcessor.elements_no_end_tag empty=re.compile(r"<((%s)[^>]*)>" % '|'.join(voids)) +# Use local time zone and locale +time.tzset() +locale.setlocale(locale.LC_ALL, '') + class stripHtml(sgmllib.SGMLParser): "remove all tags from the data" def __init__(self, data): @@ -56,13 +61,16 @@ return str(stripHtml(value)) def PlanetDate(value): + value = time.localtime(calendar.timegm(value)) return time.strftime(config.date_format(), value) def NewDate(value): return time.strftime(config.new_date_format(), value) def Rfc822(value): - return time.strftime("%a, %d %b %Y %H:%M:%S +0000", value) + wday = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'] + mon = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'] + return '%s, %02d %s %04d %02d:%02d:%02d +0000' % (wday[value[6]], value[2], mon[value[1]-1], value[0], value[3], value[4], value[5]) def Rfc3399(value): return time.strftime("%Y-%m-%dT%H:%M:%S+00:00", value) From matteo.calorio at linux.ors-tech.it Fri Sep 11 00:53:13 2009 From: matteo.calorio at linux.ors-tech.it (Matteo Calorio) Date: Thu, 10 Sep 2009 16:53:13 +0200 Subject: Dates Message-ID: <200909101653.13690.matteo.calorio@linux.ors-tech.it> Hello, I'm a new user of Planet-Venus, a great piece of software I was looking for since some time. I use it to cache some feeds when I can't follow them for some time. I use Akregator to actually read the news from an installation of Planet-Venus on a server. I use planet-venus 0~bzr95-2 on Debian Squeeze (Planet Venus 95). Everything works like a charm, but I have problems with dates: 1. with this feed (and only with this) all articles are dated 1:59AM or 2:00AM of the correct day: http://www.ansa.it/site/notizie/awnplus/topnews/synd/ansait_site_topnews_synd_Today_Idx.xml 2. in Akregator I see the dates on which articles were downloaded from original servers, but I would prefer to see the original article dates: is it possible with some configuration? Regards, Matteo From rubys at intertwingly.net Fri Sep 11 03:35:57 2009 From: rubys at intertwingly.net (Sam Ruby) Date: Thu, 10 Sep 2009 13:35:57 -0400 Subject: Dates In-Reply-To: <200909101653.13690.matteo.calorio@linux.ors-tech.it> References: <200909101653.13690.matteo.calorio@linux.ors-tech.it> Message-ID: <4AA938FD.1090607@intertwingly.net> Matteo Calorio wrote: > Hello, > > I'm a new user of Planet-Venus, a great piece of software I was looking for > since some time. I use it to cache some feeds when I can't follow them for > some time. I use Akregator to actually read the news from an installation of > Planet-Venus on a server. I use planet-venus 0~bzr95-2 on Debian Squeeze > (Planet Venus 95). Everything works like a charm, but I have problems with > dates: > > 1. with this feed (and only with this) all articles are dated 1:59AM or 2:00AM > of the correct day: > http://www.ansa.it/site/notizie/awnplus/topnews/synd/ansait_site_topnews_synd_Today_Idx.xml The feed has a problem with the pubdates provided: http://feedvalidator.org/check.cgi?url=http%3A%2F%2Fwww.ansa.it%2Fsite%2Fnotizie%2Fawnplus%2Ftopnews%2Fsynd%2Fansait_site_topnews_synd_Today_Idx.xml In particular, no time zone information is present. > 2. in Akregator I see the dates on which articles were downloaded from > original servers, but I would prefer to see the original article dates: is it > possible with some configuration? No. If the dates can't be resolved, Venus will assign the current time. > Regards, > Matteo - Sam Ruby From rubys at intertwingly.net Fri Sep 11 03:43:50 2009 From: rubys at intertwingly.net (Sam Ruby) Date: Thu, 10 Sep 2009 13:43:50 -0400 Subject: Patch: Display localized time and date with htmltmpl In-Reply-To: <4AA8F4C7.3020600@matholka.se> References: <4AA8F4C7.3020600@matholka.se> Message-ID: <4AA93AD6.8090100@intertwingly.net> Lars Ljung wrote: > > def Rfc822(value): > - return time.strftime("%a, %d %b %Y %H:%M:%S +0000", value) > + wday = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'] > + mon = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', > 'Sep', 'Oct', 'Nov', 'Dec'] > + return '%s, %02d %s %04d %02d:%02d:%02d +0000' % (wday[value[6]], > value[2], mon[value[1]-1], value[0], value[3], value[4], value[5]) RFC 822 is very specific, with no substitutions allowed. I localize dates and times on my planet using javascript. http://planet.intertwingly.net/ http://intertwingly.net/code/venus/themes/asf/personalize.js - Sam Ruby From brian.ewins at gmail.com Fri Sep 11 04:03:22 2009 From: brian.ewins at gmail.com (Baz) Date: Thu, 10 Sep 2009 19:03:22 +0100 Subject: Dates In-Reply-To: <4AA938FD.1090607@intertwingly.net> References: <200909101653.13690.matteo.calorio@linux.ors-tech.it> <4AA938FD.1090607@intertwingly.net> Message-ID: <2faad3050909101103h6ea061d1q7e00f6044c291145@mail.gmail.com> 2009/9/10 Sam Ruby : > Matteo Calorio wrote: >> Hello, >> >> I'm a new user of Planet-Venus, a great piece of software I was looking for >> since some time. I use it to cache some feeds when I can't follow them for >> some time. I use Akregator to actually read the news from an installation of >> Planet-Venus on a server. I use planet-venus 0~bzr95-2 on Debian Squeeze >> (Planet Venus 95). Everything works like a charm, but I have problems with >> dates: >> >> 1. with this feed (and only with this) all articles are dated 1:59AM or 2:00AM >> of the correct day: >> http://www.ansa.it/site/notizie/awnplus/topnews/synd/ansait_site_topnews_synd_Today_Idx.xml > > The feed has a problem with the pubdates provided: > > http://feedvalidator.org/check.cgi?url=http%3A%2F%2Fwww.ansa.it%2Fsite%2Fnotizie%2Fawnplus%2Ftopnews%2Fsynd%2Fansait_site_topnews_synd_Today_Idx.xml > > In particular, no time zone information is present. > >> 2. in Akregator I see the dates on which articles were downloaded from >> original servers, but I would prefer to see the original article dates: is it >> possible with some configuration? > > No. ?If the dates can't be resolved, Venus will assign the current time. Whoops, I see I replied to this earlier without CC'ing the list. I said much the same thing to Matteo, but suggested that a local fix could be supplied: " The universal feed parser corrects a lot of bogus date patterns, but not this one (as you've found), so it's guessing. It is fixable - see http://feedparser.org/docs/date-parsing.html and the section on registering new date formats, which you could do in spider.py. " > >> Regards, >> ? Matteo > > - Sam Ruby > -- > devel mailing list > devel at lists.planetplanet.org > http://lists.planetplanet.org/mailman/listinfo/devel > From j4_james at hotmail.com Fri Sep 11 05:24:12 2009 From: j4_james at hotmail.com (James Holderness) Date: Thu, 10 Sep 2009 20:24:12 +0100 Subject: Dates References: <200909101653.13690.matteo.calorio@linux.ors-tech.it> <4AA938FD.1090607@intertwingly.net> Message-ID: Sam Ruby wrote: > The feed has a problem with the pubdates provided: > > http://feedvalidator.org/check.cgi?url=http%3A%2F%2Fwww.ansa.it%2Fsite%2Fnotizie%2Fawnplus%2Ftopnews%2Fsynd%2Fansait_site_topnews_synd_Today_Idx.xml I'm sorry this is offtopic, but while following the feedvalidator link above, I noticed it didn't bother flagging the Root Element Type validity constraint violation. [1] Have I misunderstood the XML spec, or is it just that the feedvalidator doesn't check validity constraints? Regards James [1] http://www.w3.org/TR/REC-xml/#vc-roottype From lars at matholka.se Fri Sep 11 17:50:59 2009 From: lars at matholka.se (Lars Ljung) Date: Fri, 11 Sep 2009 09:50:59 +0200 Subject: Patch: Display localized time and date with htmltmpl In-Reply-To: <4AA93AD6.8090100@intertwingly.net> References: <4AA8F4C7.3020600@matholka.se> <4AA93AD6.8090100@intertwingly.net> Message-ID: <4AAA0163.8060505@matholka.se> Sam Ruby wrote: > > RFC 822 is very specific, with no substitutions allowed. Yes, that's why I don't use strftime() to generate RFC 822 dates. The values of %a and %b are dependent on the current locale. Regards Lars Ljung From matteo.calorio at linux.ors-tech.it Tue Sep 15 22:16:09 2009 From: matteo.calorio at linux.ors-tech.it (Matteo Calorio) Date: Tue, 15 Sep 2009 14:16:09 +0200 Subject: Dates In-Reply-To: <4AA938FD.1090607@intertwingly.net> References: <200909101653.13690.matteo.calorio@linux.ors-tech.it> <4AA938FD.1090607@intertwingly.net> Message-ID: <200909151416.09975.matteo.calorio@linux.ors-tech.it> SR> The feed has a problem with the pubdates provided: SR> http://feedvalidator.org/check.cgi?url=http%3A%2F%2Fwww.ansa.it%2Fsite%2Fnotizie%2Fawnplus%2Ftopnews%2Fsynd%2Fansait_site_topnews_synd_Today_Idx.xml SR> In particular, no time zone information is present. Thanks (also to Baz): I didn't know this site. I'll try to report this to the webadmin. SR>> 2. in Akregator I see the dates on which articles were downloaded from SR>> original servers, but I would prefer to see the original article dates: SR>> is it possible with some configuration? SR> No. If the dates can't be resolved, Venus will assign the current time. Yes, but with the site above (www.ansa.it) it seems it assigns 00.00 +timezone, because all news are assigned 2.00AM even if I download them once an hour during all the day... Matteo Calorio From mikael at nilsson.name Wed Sep 23 00:11:54 2009 From: mikael at nilsson.name (Mikael Nilsson) Date: Tue, 22 Sep 2009 16:11:54 +0200 Subject: http_cache_directory setting bug [patch] Message-ID: <1253628714.3279.18.camel@daneel> Seems to me the http_cache_directory setting is not honored in the config due to a simple bug in config.py - a missing return. --- venus/planet/config.py.orig 2009-09-21 18:18:07.000000000 +0200 +++ venus/planet/config.py 2009-09-22 16:07:48.000000000 +0200 @@ -303,7 +303,7 @@ def http_cache_directory(): if parser.has_option('Planet', 'http_cache_directory'): - os.path.join(cache_directory(), + return os.path.join(cache_directory(), parser.get('Planet', 'http_cache_directory')) else: return os.path.join(cache_directory(), "cache") Or am I mistaken? /Mikael From mikael at nilsson.name Wed Sep 23 01:49:15 2009 From: mikael at nilsson.name (Mikael Nilsson) Date: Tue, 22 Sep 2009 17:49:15 +0200 Subject: Trouble with ignore_in_feed Message-ID: <1253634555.3279.22.camel@daneel> Using latest venus, I want to disable posts jumping to the top when updated, so I found advise in an old post on this list, to set ignore_in_feed: updated in the [Planet] section. While it seems to work (it disables the jumping), it also brings with it a serious issue: All items in a newly added feed is given a time stamp of "now", completely ignoring their published date as well. I don't think that's the intention, and it's certainly not what I was expecting. Is there a fix? /Mikael From james at hackervisions.org Wed Sep 23 04:15:13 2009 From: james at hackervisions.org (James Vasile) Date: Tue, 22 Sep 2009 14:15:13 -0400 Subject: Trouble with ignore_in_feed In-Reply-To: <1253634555.3279.22.camel@daneel> References: <1253634555.3279.22.camel@daneel> Message-ID: <87pr9ig826.wl%james@hackervisions.org> I just discovered that ignore_in_feed option and set it to "updated" on the urging of Jeff Waugh and have had the same bad result. I'm willing to dig in the code (I've spent some time in Venus, so it shouldn't be too hard), but I'm a little crunched for time and won't get to it for a couple days, so if somebody else has the fix, please pipe up. At Tue, 22 Sep 2009 17:49:15 +0200, Mikael Nilsson wrote: > > Using latest venus, I want to disable posts jumping to the top when > updated, so I found advise in an old post on this list, to set > > ignore_in_feed: updated > > in the [Planet] section. > > While it seems to work (it disables the jumping), it also brings with it > a serious issue: All items in a newly added feed is given a time stamp > of "now", completely ignoring their published date as well. I don't > think that's the intention, and it's certainly not what I was > expecting. > > Is there a fix? > > /Mikael > > -- > devel mailing list > devel at lists.planetplanet.org > http://lists.planetplanet.org/mailman/listinfo/devel From mikael at nilsson.name Wed Sep 23 04:34:08 2009 From: mikael at nilsson.name (Mikael Nilsson) Date: Tue, 22 Sep 2009 20:34:08 +0200 Subject: Trouble with ignore_in_feed In-Reply-To: <1253634555.3279.22.camel@daneel> References: <1253634555.3279.22.camel@daneel> Message-ID: <1253644448.3279.49.camel@daneel> tis 2009-09-22 klockan 17:49 +0200 skrev Mikael Nilsson: > Using latest venus, I want to disable posts jumping to the top when > updated, so I found advise in an old post on this list, to set > > ignore_in_feed: updated > > in the [Planet] section. > > While it seems to work (it disables the jumping), it also brings with it > a serious issue: All items in a newly added feed is given a time stamp > of "now", completely ignoring their published date as well. I don't > think that's the intention, and it's certainly not what I was > expecting. > > Is there a fix? So, if I understand the example http://www.feedparser.org/docs/annotated-rss20.html correctly, the pubDate is mapped to "updated". What I *want* is for att Atom feeds to have their "updated" removed. What I get is that all RSS2 feeds instead have their dates removed completely. I suppose the only way is to use ignore_in_feed exlusively for atom feeds (or other feeds that use the date of updates in pubDate or dc:date). /Mikael > > /Mikael > From rubys at intertwingly.net Wed Sep 23 05:04:38 2009 From: rubys at intertwingly.net (Sam Ruby) Date: Tue, 22 Sep 2009 15:04:38 -0400 Subject: Trouble with ignore_in_feed In-Reply-To: <1253644448.3279.49.camel@daneel> References: <1253634555.3279.22.camel@daneel> <1253644448.3279.49.camel@daneel> Message-ID: <4AB91FC6.3060003@intertwingly.net> Mikael Nilsson wrote: > tis 2009-09-22 klockan 17:49 +0200 skrev Mikael Nilsson: >> Using latest venus, I want to disable posts jumping to the top when >> updated, so I found advise in an old post on this list, to set >> >> ignore_in_feed: updated >> >> in the [Planet] section. >> >> While it seems to work (it disables the jumping), it also brings with it >> a serious issue: All items in a newly added feed is given a time stamp >> of "now", completely ignoring their published date as well. I don't >> think that's the intention, and it's certainly not what I was >> expecting. >> >> Is there a fix? > > So, if I understand the example > > http://www.feedparser.org/docs/annotated-rss20.html > > correctly, the pubDate is mapped to "updated". What I *want* is for att > Atom feeds to have their "updated" removed. What I get is that all RSS2 > feeds instead have their dates removed completely. > > I suppose the only way is to use ignore_in_feed exlusively for atom > feeds (or other feeds that use the date of updates in pubDate or > dc:date). 1) ignore_in_feed does not need to be done globally (i.e., in the [Planet] section), but can be done on a feed by feed basis. You can see live examples in my planet: http://planet.intertwingly.net/config.ini 2) If dates are ignored, Venus will instead track the first time it sees an entry (or item). 3) new_feed_items can be used to limit how many items are shown from any given feed -- this is particularly useful for new feeds either without dates, or without trustworthy dates (i.e., ones that you mark with ignore_in_feed: updated) > /Mikael - Sam Ruby From mikael at nilsson.name Wed Sep 23 09:43:57 2009 From: mikael at nilsson.name (Mikael Nilsson) Date: Wed, 23 Sep 2009 01:43:57 +0200 Subject: [Patch] Sort subscriptions case insensitive Message-ID: <1253663037.3279.58.camel@daneel> For reference, I'm posting a patch to sort the subscriptions list case insensitively. I find it much better for my use case. Oh, BTW, the site I'm working on is http://live.piratpartiet.se - a blog aggregator for the Swedish Pirate party :-) --- venus/planet/shell/tmpl.py.old 2009-09-23 01:33:52.000000000 +0200 +++ venus/planet/shell/tmpl.py 2009-09-23 01:35:41.000000000 +0200 @@ -201,7 +201,7 @@ for feed in data.feed.get('sources',[]): source = tmpl_mapper(feed, Base) sources.append([source.get('name'), source]) - sources.sort() + sources.sort(lambda x,y: cmp(x[0].upper(), y[0].upper())) output['Channels'] = [source for name,source in sources] for entry in data.entries: output['Items'].append(tmpl_mapper(entry, Items)) /Mikael From ruy.jol at gmail.com Thu Sep 24 08:40:11 2009 From: ruy.jol at gmail.com (RuyJol) Date: Wed, 23 Sep 2009 17:40:11 -0500 Subject: theme Message-ID: I'm working in a planet, I'm from Mexico, and I'm looking for someone who can point me to the right direction: where can i find the bubbles theme? i hope someone can help me, thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: /archives/devel/attachments/20090923/2a4a78b7/attachment.html From david at axiombox.com Thu Sep 24 12:17:54 2009 From: david at axiombox.com (David Moreno) Date: Wed, 23 Sep 2009 22:17:54 -0400 Subject: theme In-Reply-To: References: Message-ID: <7F2BC512-32EE-4BF0-A084-342E6AA68676@axiombox.com> On Sep 23, 2009, at 6:40 PM, RuyJol wrote: > > I'm working in a planet, I'm from Mexico, and I'm looking for > someone who can point me to the right direction: where can i find > the bubbles theme? i hope someone can help me, thanks -- You can find the changes that we have made to the multiple countries on Planeta Linux, here: http://github.com/damog/planetalinux But I've been working on a new wrapper for Venus, adding extra functionality being Perl-powered, but for now, only aimed to Planeta Linux countries: http://github.com/axiombox/planetalinux http://planetalinux.org David twitter.com/damog