RhinoTrac
LassoSoft Ticket Tracking System
NOTE: If you are using Lasso Server 9.3 please Log your ticket directly via the LUX admin as this will give us more information about your issue.
Ticket #7506: Client_IP
- Reported by:
- Paul Higgins
- Date:
- 21 Mar, 2013
- Priority:
- major
- Component:
- Lasso 9
- Version:
- 9.2
- Keywords:
- Platform:
http://www.lassosoft.com/lassotalk/msg/271468/Lasso9+take+12+clientip+and+clientaddress
Reported by Marc Vos
According to the documentation (http://www.lassosoft.com/lassoDocs/languageReference/obj/client_ip), comparison with wildcards is possible.
We found two things with client_ip:
1) comparison does not work as in L8,
2) an error inside client_ip
------------------------------------------------------
When I run this snippet in Lasso 8:
[
var('x' = 0);
protect;
handle_error;
error_currentError;' @ ';$x;
/handle_error;
// This string normally comes from a database
local('ip' = '127.0.*,192.*,::1');
iterate(#ip->split(','), local('tmp'));
$x = loop_count;
if(client_ip == #tmp);
loop_count;') client_ip matches ';#tmp;' is OK.<br>';
/if;
/iterate;
/protect;
]
I get this output:
3) client_ip matches ::1 is OK.
------------------------------------------------------
When I run the same snippet in Lasso9,
I get this output:
Found non-keyword parameter at a keyword-only position @ 1
When I change 'client_ip' into 'client_address', the code works and gives the same result as with L8:
3) client_address matches ::1 is OK.
If I put ::1 in front of the string:
local('ip' = '::1,127.0.*,192.*');
and run the code, I get this output:
1) client_ip matches ::1 is OK.
Found non-keyword parameter at a keyword-only position @ 2
So there is clearly a code-flaw inside client_ip.
Please log in to your LassoSoft account to comment
Comments