Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • I Icecast-Directory
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 10
    • Issues 10
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Xiph.Org
  • Icecast-Directory
  • Issues
  • #2322
Closed
Open
Created Oct 15, 2009 by moo@moo

Illegal listen_url for legal domain name

my listen url is http://10.ladio.me:8000/ and i got the following error in icecast error.log

[2009-10-15  13:30:42] EROR yp/send_to_yp YP add on http://dir.xiph.org/cgi-bin/yp-cgi failed: Add refused. Reason: Illegal listen_url. Incorrect <hostname>.

i've checked xiph.org svn source

<?php

$listen_url = "http://10.ladio.me:8000/";
$url = @parse_url($listen_url);
var_dump($url);

var_dump(empty($url['scheme']), $url['scheme'] != 'http'
        ,!array_key_exists('host', $url)
        ,!preg_match('/^.*[A-Za-z0-9\-]+\.[A-Za-z0-9]+$/', $url['host'])
        ,preg_match('/^(10\.|192\.168\.|127\.)/', $url['host']));

got

bool(false)
bool(false)
bool(false)
bool(false)
int(1)

preg_match('/^(10\.|192\.168\.|127\.)/', $url['host']) is returning int(1), yes 10.ladio.me loos like 10.0.0.1, but it's not IP anyway imho, the regex code should be changed to preg_match('/^(10\.|192\.168\.|127\.)[0-9.]+$/', $url['host']), and this is quirk and simple

Edited Jun 22, 2017 by Marvin Scholz
Assignee
Assign to
Time tracking