@@ -37,13 +37,13 @@ public ServerConfiguration()
3737 // Multiple server addresses are supported, so validate all of them
3838 foreach ( string address in obj . Value . Split ( ',' ) . Select ( a => a . Trim ( ) ) )
3939 {
40- if ( IPNetwork . TryParse ( address , out _ ) == false )
40+ if ( IPNetwork2 . TryParse ( address , out _ ) == false )
4141 {
4242 return Resources . NetworkAddressValidationError ;
4343 }
44- // IPNetwork .TryParse recognizes single IP addresses as CIDR (with 8 mask).
44+ // IPNetwork2 .TryParse recognizes single IP addresses as CIDR (with 8 mask).
4545 // This is not good, because we want an explicit CIDR for the server.
46- // Therefore, if IPNetwork .TryParse succeeds, and IPAddress.TryParse also succeeds, we have a problem.
46+ // Therefore, if IPNetwork2 .TryParse succeeds, and IPAddress.TryParse also succeeds, we have a problem.
4747 if ( IPAddress . TryParse ( address , out _ ) )
4848 {
4949 // This is just a regular address. We want CIDR.
@@ -167,7 +167,7 @@ public ServerConfiguration()
167167 // Support CSV allowed IPs
168168 foreach ( string address in obj . Value . Split ( new [ ] { ',' } , StringSplitOptions . RemoveEmptyEntries ) . Select ( a => a . Trim ( ) ) )
169169 {
170- if ( IPNetwork . TryParse ( address , out _ ) == false )
170+ if ( IPNetwork2 . TryParse ( address , out _ ) == false )
171171 {
172172 return Resources . NetworkAddressValidationError ;
173173 }
0 commit comments