Browse Source

Allow digits in hostnames in more places (fixes #1148)

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2586 152afb58-edef-0310-8abb-c4023f1b3aa9
svn/tags/lighttpd-1.4.24
Stefan Bühler 13 years ago
parent
commit
b87d3e804b
  1. 1
      NEWS
  2. 4
      src/request.c

1
NEWS

@ -20,6 +20,7 @@ NEWS
* Reset ignored signals to SIG_DFL before exec() in fastcgi/scgi (fixes #2029)
* Show "no uri specified -> 400" error only when "debug.log-request-header-on-error" is enabled (fixes #2030)
* Fix hanging connection in mod_scgi (fixes #2024)
* Allow digits in hostnames in more places (fixes #1148)
- 1.4.23 - 2009-06-19
* Added some extra warning options in cmake and fix the resulting warnings (unused/static functions)

4
src/request.c

@ -111,7 +111,7 @@ static int request_check_hostname(server *srv, connection *con, 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])) {
@ -133,7 +133,7 @@ static int request_check_hostname(server *srv, connection *con, buffer *host) {
}
} else if (i == 0) {
/* the first character of the hostname */
if (!light_isalpha(c)) {
if (!light_isalnum(c)) {
return -1;
}
label_len++;

Loading…
Cancel
Save