Excluded IPs in the SSH login notification settings are only matched correctly if there is no whitespace after the commas. The UI says "Separate multiple IP addresses by comma" and doesn't mention this.
Saved value with spaces: [my own IP], 94.237.47.71, 5.22.210.148, 94.237.102.252, 94.237.42.145 (these are Ploi's own IPs)
A notification was sent for 94.237.47.71 (second entry, a Ploi worker IP) even though it was in the list. The first entry in the list was suppressed correctly. After saving the same list without spaces after the commas, the second entry is suppressed too. Likely cause: entries are split on a comma without trimming, so every entry except the first keeps a leading space and never matches.
Expected: trim each entry, on save or when matching.
Suggested fixes:
- Trim each entry
- Show a validation hint in the UI
- (Consider supporting IPv6 and CIDR)
Related: #1611 (global whitelist for SSH login notifications) -> https://roadmap.ploi.io/projects/1-server-level-requests/items/1611-global-list-of-ip-adresses-to-whitelist-in-ssh-login-notifications.
SSH login notification still sent for excluded IPs when the list has spaces after commas
-
Anoesj Sadraee moved item to project Bugs
2 hours ago -
Anoesj Sadraee created the item
2 hours ago