summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorlnu <lnu@f70e237a-67f3-0310-a06c-d2b8a7116972>2006-02-13 20:58:39 +0000
committerlnu <lnu@f70e237a-67f3-0310-a06c-d2b8a7116972>2006-02-13 20:58:39 +0000
commite4a177729121f189a051f0b496812bf810fd4be1 (patch)
treea8c0f28a0b5dabc029bd6fa961a51278562ba6bd /lib
parenta447f2129a5c2ce4eac92b249e5881cc88a90494 (diff)
downloadfeed2imap-e4a177729121f189a051f0b496812bf810fd4be1.tar.gz
feed2imap-e4a177729121f189a051f0b496812bf810fd4be1.tar.bz2
feed2imap-e4a177729121f189a051f0b496812bf810fd4be1.zip
don't display password in errror messages
git-svn-id: svn+ssh://svn.gna.org/svn/feed2imap/trunk/feed2imap@86 f70e237a-67f3-0310-a06c-d2b8a7116972
Diffstat (limited to '')
-rw-r--r--lib/feed2imap/httpfetcher.rb2
-rw-r--r--lib/feed2imap/imap.rb4
-rw-r--r--lib/feed2imap/itemtomail.rb3
3 files changed, 6 insertions, 3 deletions
diff --git a/lib/feed2imap/httpfetcher.rb b/lib/feed2imap/httpfetcher.rb
index 1d82b53..a548b16 100644
--- a/lib/feed2imap/httpfetcher.rb
+++ b/lib/feed2imap/httpfetcher.rb
@@ -29,7 +29,7 @@ require 'uri'
# max number of redirections
MAXREDIR = 5
-HTTPDEBUG = true
+HTTPDEBUG = false
# Class used to retrieve the feed over HTTP
class HTTPFetcher
diff --git a/lib/feed2imap/imap.rb b/lib/feed2imap/imap.rb
index 6957489..ca81a9f 100644
--- a/lib/feed2imap/imap.rb
+++ b/lib/feed2imap/imap.rb
@@ -114,7 +114,9 @@ class ImapAccount
# convert to string
def to_s
- uri.to_s
+ u2 = uri.clone
+ u2.password = nil
+ u2.to_s
end
# remove mails in a folder according to a criteria
diff --git a/lib/feed2imap/itemtomail.rb b/lib/feed2imap/itemtomail.rb
index f2c5616..20fdd12 100644
--- a/lib/feed2imap/itemtomail.rb
+++ b/lib/feed2imap/itemtomail.rb
@@ -50,8 +50,9 @@ def item_to_mail(item, index, updated, from = 'Feed2Imap')
message.header['From'] = "#{item.creator.chomp} <feed2imap@acme.com>"
end
else
- message.header['To'] = "#{from} <feed2imap@acme.com>"
+ message.header['From'] = "#{from} <feed2imap@acme.com>"
end
+ message.header['To'] = "#{from} <feed2imap@acme.com>"
if @date.nil?
message.header['Date'] = Time::new.rfc2822
else
rs/cgit.git/commit/ui-summary.c?h=v0.8.3.1&id=d14c5f6d3ac827e7b46831c4151638ab4b638ae1&follow=1'>Move log-functions into ui-log.cLars Hjemli5-111/+121 Signed-off-by: Lars Hjemli <hjemli@gmail.com> 2006-12-11Move repo summary functions into ui-summary.cLars Hjemli4-47/+59 Signed-off-by: Lars Hjemli <hjemli@gmail.com> 2006-12-11Move functions for repolist output into ui-repolist.cLars Hjemli5-70/+90 Signed-off-by: Lars Hjemli <hjemli@gmail.com> 2006-12-11Move common output-functions into ui-shared.cLars Hjemli4-82/+99 While at it, replace the cgit_[lib_]error constants with a proper function Signed-off-by: Lars Hjemli <hjemli@gmail.com> 2006-12-11Rename config.c to parsing.c + move cgit_parse_query from cgit.c to parsing.cLars Hjemli4-28/+29 Signed-off-by: Lars Hjemli <hjemli@gmail.com> 2006-12-11Avoid infinite loops in caching layerLars Hjemli3-14/+31 Add a global variable, cgit_max_lock_attemps, to avoid the possibility of infinite loops when failing to acquire a lockfile. This could happen on broken setups or under crazy server load. Incidentally, this also fixes a lurking bug in cache_lock() where an uninitialized returnvalue was used. Signed-off-by: Lars Hjemli <hjemli@gmail.com> 2006-12-11Let 'make install' clear all cachefilesLars Hjemli1-0/+2 Signed-off-by: Lars Hjemli <hjemli@gmail.com> 2006-12-11Fix cache algorithm loopholeLars Hjemli3-11/+16 This closes the door for unneccessary calls to cgit_fill_cache(). Noticed by Linus. Signed-off-by: Lars Hjemli <hjemli@gmail.com> 2006-12-10Add version identifier in generated filesLars Hjemli2-9/+14 Signed-off-by: Lars Hjemli <hjemli@gmail.com> 2006-12-10Add license file and copyright noticesLars Hjemli5-0/+372 Signed-off-by: Lars Hjemli <hjemli@gmail.com> 2006-12-10Add caching infrastructureLars Hjemli9-28/+353 This enables internal caching of page output. Page requests are split into four groups: 1) repo listing (front page) 2) repo summary 3) repo pages w/symbolic references in query string 4) repo pages w/constant sha1's in query string Each group has a TTL specified in minutes. When a page is requested, a cached filename is stat(2)'ed and st_mtime is compared to time(2). If TTL has expired (or the file didn't exist), the cached file is regenerated. When generating a cached file, locking is used to avoid parallell processing of the request. If multiple processes tries to aquire the same lock, the ones who fail to get the lock serves the (expired) cached file. If the cached file don't exist, the process instead calls sched_yield(2) before restarting the request processing. Signed-off-by: Lars Hjemli <hjemli@gmail.com>