Opened 2 years ago

Closed 2 years ago

#3108 closed Task (fixed)

core/Url.php: getCurrentHost() should fallback to SERVER_ADDR

Reported by: vipsoft Owned by:
Priority: normal Milestone: 1.x - Piwik 1.x
Component: Core Keywords:
Cc: Sensitive: no

Description (last modified by vipsoft)

If the request doesn't contain a Host: header, we should probably default to the server's IP address, $_SERVER['SERVER_ADDR'] instead of unknown

Investigate impact.

Change History (2)

comment:1 Changed 2 years ago by vipsoft (robocoder)

  • Description modified (diff)
  • Summary changed from core/Url.php: getCurrentHost() should not return 'unknown' to core/Url.php: getCurrentHost() should fallback to SERVER_ADDR

comment:2 Changed 2 years ago by vipsoft (robocoder)

  • Resolution set to fixed
  • Status changed from new to closed

(In [6208]) fixes #3108 - fallback to SERVER_ADDR if HTTP_HOST not defined

Note: See TracTickets for help on using tickets.