From 9141ee272735450a36fcf081a888407a418d4da4 Mon Sep 17 00:00:00 2001 From: Till Maas Date: Wed, 26 Oct 2016 17:03:29 +0200 Subject: [PATCH] Use https for links in e-mail notifications --- app/models/notifier.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/models/notifier.rb b/app/models/notifier.rb index a498e4edf6..b162c1feee 100644 --- a/app/models/notifier.rb +++ b/app/models/notifier.rb @@ -7,6 +7,7 @@ class Notifier < ActionMailer::Base def signup_confirm(user, token) with_recipient_locale user do @url = url_for(:host => SERVER_URL, + :protocol => "https", :controller => "user", :action => "confirm", :display_name => user.display_name, :confirm_string => token.token) @@ -20,6 +21,7 @@ def email_confirm(user, token) with_recipient_locale user do @address = user.new_email @url = url_for(:host => SERVER_URL, + :protocol => "https", :controller => "user", :action => "confirm_email", :confirm_string => token.token) @@ -31,6 +33,7 @@ def email_confirm(user, token) def lost_password(user, token) with_recipient_locale user do @url = url_for(:host => SERVER_URL, + :protocol => "https", :controller => "user", :action => "reset_password", :token => token.token) @@ -71,9 +74,11 @@ def message_notification(message) @text = message.body @title = message.title @readurl = url_for(:host => SERVER_URL, + :protocol => "https", :controller => "message", :action => "read", :message_id => message.id) @replyurl = url_for(:host => SERVER_URL, + :protocol => "https", :controller => "message", :action => "reply", :message_id => message.id) @@ -90,18 +95,21 @@ def diary_comment_notification(comment, recipient) @text = comment.body @title = comment.diary_entry.title @readurl = url_for(:host => SERVER_URL, + :protocol => "https", :controller => "diary_entry", :action => "view", :display_name => comment.diary_entry.user.display_name, :id => comment.diary_entry.id, :anchor => "comment#{comment.id}") @commenturl = url_for(:host => SERVER_URL, + :protocol => "https", :controller => "diary_entry", :action => "view", :display_name => comment.diary_entry.user.display_name, :id => comment.diary_entry.id, :anchor => "newcomment") @replyurl = url_for(:host => SERVER_URL, + :protocol => "https", :controller => "message", :action => "new", :display_name => comment.user.display_name, @@ -117,9 +125,11 @@ def friend_notification(friend) with_recipient_locale friend.befriendee do @friend = friend @viewurl = url_for(:host => SERVER_URL, + :protocol => "https", :controller => "user", :action => "view", :display_name => @friend.befriender.display_name) @friendurl = url_for(:host => SERVER_URL, + :protocol => "https", :controller => "user", :action => "make_friend", :display_name => @friend.befriender.display_name)