Skip to content
This repository was archived by the owner on Nov 25, 2023. It is now read-only.

Commit

Permalink
check if body is encrypted, fixes #10
Browse files Browse the repository at this point in the history
  • Loading branch information
wiegelmann committed Dec 19, 2013
1 parent 30efb9c commit 1cdb1b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/messages_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def create
respond_to do |format|
if spam.size >= 5
format.html { redirect_to "/", notice: 'Spam? Please wait 5 minutes!' }
elsif is_email?(to) and is_email?(from) and spam.size <= 5
elsif is_email?(to) and is_email?(from) and spam.size <= 5 and body.include?("BEGIN PGP MESSAGE") and body.include?("END PGP MESSAGE")
Message.create!(:tohash => tohash, :fromhash => fromhash) # ignore message body
MessageMailer.send_message(to, from, body).deliver
MessageMailer.thanks_message(to, from).deliver
Expand Down

0 comments on commit 1cdb1b5

Please # to comment.