InterTiki fails to recognize same-server (127.0.0.1)
- Status
- Open
- Subject
- InterTiki fails to recognize same-server (127.0.0.1)
- Version
- 3.x
- Category
- Usability
- Regression
- Consistency
- Feature
- InterTiki
- Submitted by
- mizraith
- Lastmod by
- mizraith
- Rating
- Description
This may or may not be considered an error, but is not-as-expected behavior.
Problem
When setting up InterTiki, one would assume that 127.0.0.1 would work as an IP filter for localhost. However, it was pretty clear that this was not working in 3.0 (beta 3, beta 4, rc1)
Regression
- Turned on the XMLRPC debugger in /lib/userlib.php around line 2817 $client->setDebug(1); to look at the response back from the server and do a bunch of printouts.
Traced InterTiki problems to the IP security check to the following (line 55) in /remote.php.Copy to clipboardif (!isset($prefs['known_hosts'][$key]) or $prefs['known_hosts'][$key]['ip'] != $tikilib->get_ip_address()) {
By changing the line to the following, the IP check problems went away:Copy to clipboardif (!isset($prefs['known_hosts'][$key])) {
- Turned on the XMLRPC debugger in /lib/userlib.php around line 2817 $client->setDebug(1); to look at the response back from the server and do a bunch of printouts.
- Solution
Possible solution
There are a couple of possible ways to address this.
- The most user transparent would be to simply check if the user has entered 127.0.0.1 and in such a case check $_SERVERSERVER_ADDR against $tikilib->get_ip_address().
- Another option would be to add a feature (with a warning) to simply turn OFF the IP check.
my syntax may not be perfect, but the idea might beCopy to clipboard//add this inside the remote.php file prior to the line 55 IP check if ( $prefs['known_hosts'][$key]['ip'] == "127.0.0.1" or $prefs['known_hosts'][$key]['ip']=="localhost") { if ($tikilib->get_ip_address() == $_SERVER[SERVER_ADDR] ) { $intertikilocalreq = TRUE; // then modify the line 55 if statement to read something like: if (!$intertikilocalreq or !isset($prefs['known_hosts'][$key]) or $prefs['known_hosts'][$key]['ip'] != $tikilib->get_ip_address()) { ..... }- Priority
- 25
- Demonstrate Bug on Tiki 19+
-
This bug has been demonstrated on show2.tiki.org
Please demonstrate your bug on show2.tiki.org
Show.tiki.org is not configured properlyThe public/private keys configured to connect to show2.tiki.org were not accepted. Please make sure you are using RSA keys. Thanks.
- Demonstrate Bug (older Tiki versions)
-
This bug has been demonstrated on show.tikiwiki.org
Please demonstrate your bug on show.tikiwiki.org
Show.tiki.org is not configured properlyThe public/private keys configured to connect to show.tikiwiki.org were not accepted. Please make sure you are using RSA keys. Thanks.
- Ticket ID
- 2500
- Created
- Tuesday 12 May, 2009 00:59:51 UTC
by Unknown - LastModif
- Tuesday 12 May, 2009 01:00:48 UTC