summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog2
-rw-r--r--lib/feed2imap/channel.rb8
-rw-r--r--lib/feed2imap/feed2imap.rb4
3 files changed, 10 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index a3fb313..5c4d45b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
Feed2Imap 0.6 (XX/09/2005)
============================
+* Issue a warning if the config file is world readable.
+* Fixed a small bug in Atom feeds parsing. And found a bug in Dotclear.
* Fix another bug related to escaped HTML.
Feed2Imap 0.5 (19/09/2005)
diff --git a/lib/feed2imap/channel.rb b/lib/feed2imap/channel.rb
index 9ed3bdc..c43c254 100644
--- a/lib/feed2imap/channel.rb
+++ b/lib/feed2imap/channel.rb
@@ -91,9 +91,10 @@ class Channel
end
# Link
doc.root.each_element('/feed/link') do |e|
- if e.attribute('type').value == 'text/html' or
- e.attribute('type').value == 'application/xhtml' or
- e.attribute('type').value == 'application/xhtml+xml'
+ if e.attribute('type') and (
+ e.attribute('type').value == 'text/html' or
+ e.attribute('type').value == 'application/xhtml' or
+ e.attribute('type').value == 'application/xhtml+xml')
if (h = e.attribute('href')) && h
@link = h.value.rmWhiteSpace!
end
@@ -124,7 +125,6 @@ class Item
attr_accessor :title, :link, :content, :date, :creator, :subject,
:category, :cacheditem
attr_reader :channel
-
def initialize(item = nil, channel = nil)
@channel = channel
@title, @link, @content, @date, @creator, @subject, @category = nil
diff --git a/lib/feed2imap/feed2imap.rb b/lib/feed2imap/feed2imap.rb
index 38046e9..a20eeed 100644
--- a/lib/feed2imap/feed2imap.rb
+++ b/lib/feed2imap/feed2imap.rb
@@ -46,6 +46,10 @@ class Feed2Imap
@logger.fatal("Configuration file #{configfile} not found.")
exit(1)
end
+ if (File::stat(configfile).mode & 044) != 0
+ @logger.warn("Configuration file is readable by other users. It" +
+ "probably contains your password.")
+ end
begin
File::open(configfile) {
|f| @config = F2IConfig::new(f)