From 4b6e9da58611bbf086ae2932a06d41fe9d82b766 Mon Sep 17 00:00:00 2001 From: stbuehler Date: Tue, 14 Jul 2009 12:58:02 +0000 Subject: Allow digits in hostnames in more places (fixes #1148) git-svn-id: svn://svn.lighttpd.net/lighttpd/trunk@2587 152afb58-edef-0310-8abb-c4023f1b3aa9 --- NEWS | 1 + src/request.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 066ba6ac..48e39f2e 100644 --- a/NEWS +++ b/NEWS @@ -134,6 +134,7 @@ NEWS * Set FD_CLOEXEC for bound sockets before pipe-logger forks (fixes #2026) * Report non-fatal ssl errors as "connection close" * Add '%_' pattern for complete hostname in mod_evhost (fixes #1737) + * Allow digits in hostnames in more places (fixes #1148) - 1.5.0-r19.. - * -F option added for spawn-fcgi diff --git a/src/request.c b/src/request.c index a3cde829..26463f24 100644 --- a/src/request.c +++ b/src/request.c @@ -113,7 +113,7 @@ static int request_check_hostname(buffer *host) { /* check the first character at right of the dot */ if (is_ip == 0) { - if (!light_isalpha(host->ptr[i+1])) { + if (!light_isalnum(host->ptr[i+1])) { return -1; } } else if (!light_isdigit(host->ptr[i+1])) { @@ -135,7 +135,7 @@ static int request_check_hostname(buffer *host) { } } else if (i == 0) { /* the first character of the hostname */ - if (!light_isalpha(c)) { + if (!light_isalnum(c)) { return -1; } label_len++; -- cgit v1.2.1