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 |
||
|---|---|---|
| .. | ||
| components | ||
| controllers | ||
| live | ||
| endpoint.ex | ||
| gettext.ex | ||
| router.ex | ||
| telemetry.ex | ||
| user_auth.ex | ||