View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
13339 | Bug reports | Other | public | 2018-02-12 23:50 | 2018-02-22 11:49 |
Reporter | dapster105 | Assigned To | c_schmitz | ||
Priority | none | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Product Version | 3.1.x | ||||
Fixed in Version | 3.4.x | ||||
Summary | 13339: ipaddr field always records 'invalid' | ||||
Description | ip addresses are not recorded properly | ||||
Steps To Reproduce | create survey as non-anonymous and request ip addresses are captured. Check database for completed responses. ipaddr field will be filled with 'invalid' | ||||
Tags | No tags attached. | ||||
Bug heat | 4 | ||||
Complete LimeSurvey version number (& build) | 3.1.0+180124 | ||||
I will donate to the project if issue is resolved | No | ||||
Browser | |||||
Database type & version | Sql Server | ||||
Server OS (if known) | Win | ||||
Webserver software & version (if known) | IIS | ||||
PHP Version | latest | ||||
This might happen if your LImeSurvey installation cannot properly determine the IP address to a server misconfiguration. In application/helpers/common_helper.php around line 4709
and run the survey. This will dump some information on screen - if your screen is just white look at the HTML source. Let us know what output you get. |
|
Feedback please? |
|
Thanks for the hint, it helped me find a local fix in the GetIPAddress function in common_helper. On Azure (my host) $_SERVER['HTTP_X_FORWARDED_FOR'] returns a non-empty string, though not a valid ip address. My local solution was to promote $_SERVER['REMOTE_ADDR'] higher up the ifelse block so this value is picked up. A proper 'fix' would probably be to have the ifelse block checking for a valid ip address, not just checking if !empty? |
|
Just out of curiosity: What string did it return? |
|
Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=26530 |
|
Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=26531 |
|
I actually didn't note it at the time (just observed the non-empty invalid ip condition) but just ran a test and on Azure I get (real ips hidden): HTTP_CLIENT_IP: (blank) REMOTE_ADDR: 999.99.99.999 HTTP_X_FORWARDED_FOR: 999.99.99.999:99999 so the HTTP_X_FORWARDED_FOR includes a port number which could, presumably, be stripped off. The IP itself is identical to REMOTE_ADDR in my case. Interestingly, I have read elsewhere (https://www.jamescrowley.co.uk/2007/06/19/gotcha-http-x-forwarded-for-returns-multiple-ip-addresses/) that in certain conditions, HTTP_X_FORWARDED_FOR can contain a sequence of comma-separated IP addresses. |
|
LimeSurvey: master 829e5122 2018-02-21 12:49 Details Diff |
Fixed issue 13339: IP address field always records 'invalid' Dev All available methods are tried now until a valid email address is found, otherwise 127.0.0.1 is assumed. Dev The value 'Invalid' will not be used anymore. |
Affected Issues 13339 |
|
mod - application/helpers/common_helper.php | Diff File | ||
LimeSurvey: master 6151cda8 2018-02-21 13:31 Details Diff |
Fixed issue 13339: IP address field always records 'invalid' |
Affected Issues 13339 |
|
mod - application/helpers/common_helper.php | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2018-02-12 23:50 | dapster105 | New Issue | |
2018-02-13 14:29 | c_schmitz | Assigned To | => c_schmitz |
2018-02-13 14:29 | c_schmitz | Status | new => feedback |
2018-02-13 14:29 | c_schmitz | Note Added: 46408 | |
2018-02-16 18:22 | c_schmitz | Note Edited: 46408 | |
2018-02-20 13:22 | c_schmitz | Note Added: 46607 | |
2018-02-21 11:12 | dapster105 | Note Added: 46635 | |
2018-02-21 11:12 | dapster105 | Status | feedback => assigned |
2018-02-21 11:41 | c_schmitz | Note Added: 46641 | |
2018-02-21 11:55 | c_schmitz | Status | assigned => resolved |
2018-02-21 11:55 | c_schmitz | Resolution | open => fixed |
2018-02-21 11:55 | c_schmitz | Fixed in Version | => 3.4.x |
2018-02-21 11:56 | c_schmitz | Changeset attached | => LimeSurvey master 829e5122 |
2018-02-21 11:56 | c_schmitz | Note Added: 46643 | |
2018-02-21 12:39 | c_schmitz | Changeset attached | => LimeSurvey master 6151cda8 |
2018-02-21 12:39 | c_schmitz | Note Added: 46649 | |
2018-02-21 16:37 | ollehar | Status | resolved => closed |
2018-02-22 11:49 | dapster105 | Note Added: 46717 |