towerops/lib/towerops_web
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
..
components Fix admin layout to use proper Phoenix component pattern 2026-01-06 13:04:22 -06:00
controllers Fix impersonation to show correct user data and banner 2026-01-06 13:22:13 -06:00
live Add input validation for port numbers and SNMP testing 2026-01-06 13:28:30 -06:00
endpoint.ex init 2025-12-21 11:10:43 -06:00
gettext.ex init 2025-12-21 11:10:43 -06:00
router.ex Add superuser system with user impersonation for admin support 2026-01-06 12:50:10 -06:00
telemetry.ex format 2025-12-21 11:31:08 -06:00
user_auth.ex Add input validation for port numbers and SNMP testing 2026-01-06 13:28:30 -06:00