|
33 | 33 | @UtilityClass |
34 | 34 | public class GeneralUtils { |
35 | 35 |
|
36 | | - /** Maximum number of resolved DNS addresses allowed for a host before it is considered unsafe. */ |
| 36 | + /** |
| 37 | + * Maximum number of resolved DNS addresses allowed for a host before it is considered unsafe. |
| 38 | + */ |
37 | 39 | private static final int MAX_DNS_ADDRESSES = 20; |
38 | 40 |
|
39 | 41 | private final Set<String> DEFAULT_VALID_SCRIPTS = Set.of("png_to_webp.py", "split_photos.py"); |
@@ -298,8 +300,8 @@ public boolean isURLReachable(String urlStr) { |
298 | 300 | } |
299 | 301 |
|
300 | 302 | /** |
301 | | - * Checks whether a URL is reachable using configurable timeouts. Only {@code http} and |
302 | | - * {@code https} protocols are permitted, and local/private/multicast ranges are blocked. |
| 303 | + * Checks whether a URL is reachable using configurable timeouts. Only {@code http} and {@code |
| 304 | + * https} protocols are permitted, and local/private/multicast ranges are blocked. |
303 | 305 | * |
304 | 306 | * @param urlStr the URL to probe |
305 | 307 | * @param connectTimeout connection timeout in milliseconds |
@@ -417,8 +419,8 @@ private boolean isSensitiveAddress(InetAddress address) { |
417 | 419 | } |
418 | 420 |
|
419 | 421 | /** |
420 | | - * Checks whether an IPv4 address is private or reserved. Any malformed input defaults to |
421 | | - * {@code true} (conservative) to avoid misuse. |
| 422 | + * Checks whether an IPv4 address is private or reserved. Any malformed input defaults to {@code |
| 423 | + * true} (conservative) to avoid misuse. |
422 | 424 | * |
423 | 425 | * @param address 4-byte IPv4 address |
424 | 426 | * @return {@code true} if private/reserved |
@@ -488,8 +490,8 @@ private boolean isUniqueLocalIPv6(byte[] address) { |
488 | 490 | } |
489 | 491 |
|
490 | 492 | /** |
491 | | - * Checks whether an IPv6 address is an IPv4-mapped address (::ffff:0:0/96). Any malformed |
492 | | - * input defaults to {@code false} (conservative) to avoid misuse. |
| 493 | + * Checks whether an IPv6 address is an IPv4-mapped address (::ffff:0:0/96). Any malformed input |
| 494 | + * defaults to {@code false} (conservative) to avoid misuse. |
493 | 495 | * |
494 | 496 | * @param address 16-byte IPv6 address |
495 | 497 | * @return {@code true} if IPv4-mapped |
|
0 commit comments