|
Lines 1791-1797
validate_options(fko_cli_options_t *options)
Link Here
|
| 1791 |
strlcpy(options->use_rc_stanza, options->spa_server_str, sizeof(options->use_rc_stanza)); |
1791 |
strlcpy(options->use_rc_stanza, options->spa_server_str, sizeof(options->use_rc_stanza)); |
| 1792 |
} |
1792 |
} |
| 1793 |
|
1793 |
|
| 1794 |
/* Gotta have a Destination unless we are just testing or getting the |
1794 |
/* Must have a destination unless we are just testing or getting the |
| 1795 |
* the version, and must use one of [-s|-R|-a]. |
1795 |
* the version, and must use one of [-s|-R|-a]. |
| 1796 |
*/ |
1796 |
*/ |
| 1797 |
if(!options->test |
1797 |
if(!options->test |
|
Lines 1825-1844
validate_options(fko_cli_options_t *options)
Link Here
|
| 1825 |
"[-] WARNING: Should use -a or -R to harden SPA against potential MITM attacks"); |
1825 |
"[-] WARNING: Should use -a or -R to harden SPA against potential MITM attacks"); |
| 1826 |
} |
1826 |
} |
| 1827 |
} |
1827 |
} |
|
|
1828 |
} |
| 1828 |
|
1829 |
|
| 1829 |
/* Make sure -a overrides IP resolution |
1830 |
/* Make sure -a overrides IP resolution |
| 1830 |
*/ |
1831 |
*/ |
| 1831 |
if(options->allow_ip_str[0] != 0x0 |
1832 |
if(options->allow_ip_str[0] != 0x0 |
| 1832 |
&& strncasecmp(options->allow_ip_str, "resolve", strlen("resolve")) != 0) |
1833 |
&& strncasecmp(options->allow_ip_str, "resolve", strlen("resolve")) != 0) |
| 1833 |
{ |
1834 |
{ |
| 1834 |
options->resolve_ip_http_https = 1; |
1835 |
options->resolve_ip_http_https = 0; |
| 1835 |
|
1836 |
|
| 1836 |
if(! is_valid_ipv4_addr(options->allow_ip_str)) |
1837 |
if(! is_valid_ipv4_addr(options->allow_ip_str)) |
| 1837 |
{ |
1838 |
{ |
| 1838 |
log_msg(LOG_VERBOSITY_ERROR, |
1839 |
log_msg(LOG_VERBOSITY_ERROR, |
| 1839 |
"Invalid allow IP specified for SPA access"); |
1840 |
"Invalid allow IP specified for SPA access"); |
| 1840 |
exit(EXIT_FAILURE); |
1841 |
exit(EXIT_FAILURE); |
| 1841 |
} |
|
|
| 1842 |
} |
1842 |
} |
| 1843 |
} |
1843 |
} |
| 1844 |
|
1844 |
|
| 1845 |
- |
|
|