Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add validity check on new options

  • Loading branch information...
commit f8fd5806b79bf46eba0adefe83ea6726346f954c 1 parent b66a690
@gi-lunaweb authored
Showing with 3 additions and 0 deletions.
  1. +3 −0  lib/god/contacts/email.rb
View
3  lib/god/contacts/email.rb
@@ -91,6 +91,9 @@ def valid?
valid &= complain("Attribute 'server_user' must be specified", self) unless arg(:server_user)
valid &= complain("Attribute 'server_password' must be specified", self) unless arg(:server_password)
end
+ if arg(:enable_starttls_auto)
+ valid &= complain("Attribute 'openssl_verify_mode' must be one of [ nil, OpenSSL::SSL::VERIFY_NONE, OpenSSL::SSL::VERIFY_PEER, OpenSSL::SSL::VERIFY_CLIENT_ONCE, OpenSSL::SSL::VERIFY_FAIL_IF_NO_PEER_CERT ]", self) unless [ nil, OpenSSL::SSL::VERIFY_NONE, OpenSSL::SSL::VERIFY_PEER, OpenSSL::SSL::VERIFY_CLIENT_ONCE, OpenSSL::SSL::VERIFY_FAIL_IF_NO_PEER_CERT ].include?(arg(:openssl_verify_mode))
+ end
end
valid
end
Please sign in to comment.
Something went wrong with that request. Please try again.