]> source.dussan.org Git - redmine.git/commitdiff
Fixed: Atom feeds leak email address (#3408).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Mon, 25 May 2009 18:11:32 +0000 (18:11 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Mon, 25 May 2009 18:11:32 +0000 (18:11 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2763 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/views/common/feed.atom.rxml
app/views/issues/changes.rxml

index d276928a5a43841233a465743fb6aebac650fa91..688d1d27a7e6ceaa809ef610549e811c436b9a0e 100644 (file)
@@ -21,7 +21,7 @@ xml.feed "xmlns" => "http://www.w3.org/2005/Atom" do
       author = item.event_author if item.respond_to?(:event_author)
       xml.author do
         xml.name(author)
-        xml.email(author.mail) if author.respond_to?(:mail) && !author.mail.blank?
+        xml.email(author.mail) if author.is_a?(User) && !author.mail.blank? && !author.pref.hide_mail
       end if author
       xml.content "type" => "html" do
         xml.text! textilizable(item.event_description, :only_path => false)
index 239d2d6a31cbdacf605bedfe452f255166f48233..43324cfb8b9ae4113384df5060c25a65d4d958e0 100644 (file)
@@ -15,7 +15,7 @@ xml.feed "xmlns" => "http://www.w3.org/2005/Atom" do
       xml.updated change.created_on.xmlschema
       xml.author do
         xml.name change.user.name
-        xml.email(change.user.mail)
+        xml.email(change.user.mail) if change.user.is_a?(User) && !change.user.mail.blank? && !change.user.pref.hide_mail
       end
       xml.content "type" => "html" do
         xml.text! '<ul>'