Skip to content

Commit

Permalink
Skip ping command when authorizing commands in ACL
Browse files Browse the repository at this point in the history
  • Loading branch information
kelvinmwinuka committed Feb 11, 2024
1 parent 5bb5d54 commit 4a2b9a3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/modules/acl/acl.go
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,11 @@ func (acl *ACL) AuthorizeConnection(conn *net.Conn, cmd []string, command utils.
return nil
}

// Skip ping
if strings.EqualFold(comm, "ping") {
return nil
}

// If the command is 'auth', then return early and allow it
if strings.EqualFold(comm, "auth") {
// TODO: Add rate limiting to prevent auth spamming
Expand Down

0 comments on commit 4a2b9a3

Please sign in to comment.