towerops/lib/towerops_web/live
Graham McIntire 152c308b68
Add input validation for port numbers and SNMP testing
Security improvements to prevent potential issues:

1. Port Validation (normalize_port):
   - Validate port range is 1-65535
   - Use Integer.parse instead of String.to_integer to prevent crashes
   - Return default port 161 for any invalid input

2. SNMP Test Validation (validate_test_snmp_input):
   - Validate IP address format before allowing SNMP tests
   - Require non-empty community string
   - Prevent network scanning with invalid/missing IPs
   - Return clear error messages for validation failures

These changes ensure user input is properly validated and prevent:
- Integer overflow/underflow with ports
- Process crashes from invalid input
- Unauthorized network scanning via SNMP test feature
- SNMP requests with missing credentials
2026-01-06 13:28:30 -06:00
..
admin Add superuser system with user impersonation for admin support 2026-01-06 12:50:10 -06:00
alert_live Fix impersonation to show correct user data and banner 2026-01-06 13:22:13 -06:00
equipment_live Add input validation for port numbers and SNMP testing 2026-01-06 13:28:30 -06:00
graph_live Fix impersonation to show correct user data and banner 2026-01-06 13:22:13 -06:00
org_live Fix impersonation to show correct user data and banner 2026-01-06 13:22:13 -06:00
site_live Fix impersonation to show correct user data and banner 2026-01-06 13:22:13 -06:00
dashboard_live.ex fix dialyzer things 2026-01-03 12:56:40 -06:00
dashboard_live.html.heex Fix impersonation to show correct user data and banner 2026-01-06 13:22:13 -06:00