Skip to content

Commit 82b65c8

Browse files
feat: log failed webgui login attempts
Logs failed login attempts with the client IP address for security monitoring purposes. Cherry-picked from postalserver/postal PR postalserver#3221 Co-authored-by: olegbliaher <olegbliaher@users.noreply.github.com> Co-authored-by: openhands <openhands@all-hands.dev>
1 parent 3b95fde commit 82b65c8

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

app/controllers/sessions_controller.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ def create
1212
flash[:remember_login] = true
1313
redirect_to_with_return_to root_path
1414
rescue Postal::Errors::AuthenticationError
15+
Postal.logger.error "Invalid credentials for #{request.remote_ip}", component: "postal-web"
1516
flash.now[:alert] = "The credentials you've provided are incorrect. Please check and try again."
1617
render "new"
1718
end

0 commit comments

Comments
 (0)