Bugzilla – Bug 2008
Allow (DDNS) hostnames in allowedHosts
Last modified: 2008-09-15 14:36:01 UTC
The problem I have been facing is that I share a Slimserver on the WAN with some friends. I have a Dynamic ip address and in order to use this Slimserver I had to modify allowedHost in de pref file everytime my ip address changed. This patch allows hostnames in the allowedHosts list. @@ -1086,12 +1086,18 @@ sub isAllowedHost { my $host = shift; my @rules = split /\,/, Slim::Utils::Prefs::get('allowedHosts'); foreach my $item (@rules) { + # hack to allow hostnames in allowedHosts list + if(index ($item, "*") == -1){ + my $packed = gethostbyname($item) or return 0; + $item = inet_ntoa($packed); + } + if ($item eq $host) { #If the host matches a specific IP, return valid return 1; } else { my @matched = (0,0,0,0);
Thanks - applied in subversion change 4067