Changeset 4209 for cherokee/trunk
- Timestamp:
- 08/02/10 12:34:26 (1 month ago)
- Files:
-
- cherokee/trunk/cherokee/access.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
cherokee/trunk/cherokee/access.c
r4141 r4209 401 401 int mask; 402 402 char sep; 403 404 slash = strpbrk(ip_or_subnet, "/\\"); 403 int colon; 404 405 slash = strpbrk (ip_or_subnet, "/\\"); 406 colon = (strchr (ip_or_subnet, ':') != NULL); 405 407 406 408 /* Add a single IP address … … 410 412 int is_domain = 0; 411 413 412 while (*i && !is_domain) { 413 if (((*i >= 'a') && (*i <= 'z')) || 414 ((*i >= 'A') && (*i <= 'Z'))) 415 is_domain = 1; 416 i++; 414 if (! colon) { 415 while (*i && !is_domain) { 416 if (((*i >= 'a') && (*i <= 'z')) || 417 ((*i >= 'A') && (*i <= 'Z'))) { 418 is_domain = 1; 419 } 420 i++; 421 } 417 422 } 418 423 … … 427 432 mask = atoi(slash+1); 428 433 429 if ( (strchr(ip_or_subnet, ':') != NULL)&& (mask == 128)) {434 if (colon && (mask == 128)) { 430 435 sep = *slash; 431 436 *slash = '\0';