The isValidIP operator returns true even if the "operand" contains whitespace at the beginning or end.
Hi.
the following case, valid returns true.
| isValidIPv4(" 192.168.50.50") as valid
| isValidIPv4("192.168.50.50 ") as valid
| isValidIPv4(" 192.168.50.50 ") as valid
But, in this case private returns false.
| isPrivateIP(" 192.168.50.50") as private
I think "isPrivateIP" case is correct. Becase Whitespace means noise.
So I think it would be better to return false for isValidIPV4 as well.
-
Official comment
Hi Hirotoshi,
IsValidIPv4 operator is used to detect if the IP address is a valid IP Address or not.
-
If the string is a valid IP it returns true
-
If the string is not a valid IP, it should return false
Can you check if this is also the case with when using isValid operator?
If yes then this need to be properly investigated and to see if it is a defect for which I would recommend you to open a support ticket with Sumo logic Support.
Regards,
RahulComment actions -
-
Hi Rahul,
Thank you for reply about isValidIPv4 specification.
It's same behavior, using isValidIPv4 and isValidIP.
I tried using isValid operator, but the following "No definition found" message is appeared.
- No definition found for function isValid(String).I would consider opening a Sumo logic support ticket. Thank you.
Please sign in to leave a comment.
Comments
2 comments