You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I created the following range IP: 194.214.29.0-194.214.29.255
Which is converted to the following binary IP: ["111101001010011110001100000000", "111101001010011110001000000001"] (from the calculateIp function here
)
So 194.214.29.0 < 194.214.29.197 < 194.214.29.255 is true
but range binary IP 1 < my binary IP < range binary IP 2 is not true
because my binary IP has an extra bit 31 instead of 30?
As a temporary solution (I think it's working), I updated your condition from:
I created the following range IP:
194.214.29.0-194.214.29.255
Which is converted to the following binary IP:
["111101001010011110001100000000", "111101001010011110001000000001"]
(from thecalculateIp
function hereuser-access-manager/src/User/UserHandler.php
Line 80 in 1af00e7
Now, when my laptop IP is on
194.214.29.197
, the associated binary IP is:1111010010100111100010001110111
The function
isIpInRange
returnsfalse
(here:user-access-manager/src/User/UserHandler.php
Line 132 in 1af00e7
So
194.214.29.0 < 194.214.29.197 < 194.214.29.255
is truebut
range binary IP 1 < my binary IP < range binary IP 2
is not truebecause my binary IP has an extra bit 31 instead of 30?
As a temporary solution (I think it's working), I updated your condition from:
to
Let me know your thoughts, not sure this is a nice way to fix this
Thanks,
The text was updated successfully, but these errors were encountered: