Flagging potential man-in-the-middle attack #291
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Postgresql discovered a potential security issue in its server and standard driver which might allow a potential man-in-the-middle attack while attempting to make an ssl connection. See
https://www.postgresql.org/about/news/postgresql-141-135-129-1114-1019-and-9624-released-2349/
for more details. Whilst Postmodern does not have this issue, after discussions with the Postgresql security team, we agreed to flag evidence of attempted attacks using this vector.
If Postmodern is trying to set up an ssl connection and unexpected extra data was received prior to an ssl connection being created, such unexpected extra data may indicate an attempted man-in-the-middle attack. With this commit, in such a situation, Postmodern will check the new cl-postgres exported variable on-evidence-of-man-in-the-middle-attack to determine its response. By default, this variable is set to :error. You can set the response to be a simple warning (by setting it to :warn) or you can set it to :ignore.