Add validateHostname and validateOptionalHostname to host_utils.dart; reject values containing @, /, \, or control characters (< 0x20 or 0x7F)
Wire validateHostname into IMAP and SMTP host fields in AddAccountScreen and EditAccountScreen
Wire validateOptionalHostname into the optional ManageSieve host field in EditAccountScreen
Test plan
task check-fast passes locally
Entering evil@host or host/path shows "Invalid hostname" inline error and blocks form submission
## Summary
- Add `validateHostname` and `validateOptionalHostname` to `host_utils.dart`; reject values containing `@`, `/`, `\`, or control characters (< 0x20 or 0x7F)
- Wire `validateHostname` into IMAP and SMTP host fields in `AddAccountScreen` and `EditAccountScreen`
- Wire `validateOptionalHostname` into the optional ManageSieve host field in `EditAccountScreen`
## Test plan
- [x] `task check-fast` passes locally
- [x] Entering `evil@host` or `host/path` shows "Invalid hostname" inline error and blocks form submission
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
validateHostnameandvalidateOptionalHostnametohost_utils.dart; reject values containing@,/,\, or control characters (< 0x20 or 0x7F)validateHostnameinto IMAP and SMTP host fields inAddAccountScreenandEditAccountScreenvalidateOptionalHostnameinto the optional ManageSieve host field inEditAccountScreenTest plan
task check-fastpasses locallyevil@hostorhost/pathshows "Invalid hostname" inline error and blocks form submission