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

Commit 1cdb1b5

Browse files
committed
check if body is encrypted, fixes #10
1 parent 30efb9c commit 1cdb1b5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/controllers/messages_controller.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def create
3434
respond_to do |format|
3535
if spam.size >= 5
3636
format.html { redirect_to "/", notice: 'Spam? Please wait 5 minutes!' }
37-
elsif is_email?(to) and is_email?(from) and spam.size <= 5
37+
elsif is_email?(to) and is_email?(from) and spam.size <= 5 and body.include?("BEGIN PGP MESSAGE") and body.include?("END PGP MESSAGE")
3838
Message.create!(:tohash => tohash, :fromhash => fromhash) # ignore message body
3939
MessageMailer.send_message(to, from, body).deliver
4040
MessageMailer.thanks_message(to, from).deliver

0 commit comments

Comments
 (0)