Skip to content

Commit

Permalink
Only allow cleartext when using an ssl connection
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Fortescue committed Dec 16, 2020
1 parent 20d13e0 commit fa59c75
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/pq/connection.cr
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ module PQ
when Frame::Authentication::Type::OK
# no op
when Frame::Authentication::Type::CleartextPassword
raise "Cleartext auth over unencrypted connection is not supported" if !@soc.is_a?(OpenSSL::SSL::Socket::Client)
handle_auth_cleartext auth_frame.body
when Frame::Authentication::Type::SASL
handle_auth_sasl auth_frame.body
Expand Down

0 comments on commit fa59c75

Please sign in to comment.