Project

General

Profile

Actions

Bug #888

closed

services_dhcp_edit.php - The hostname cannot end with a hyphen according to RFC952

Added by Roop Singh about 14 years ago. Updated about 14 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
09/11/2010
Due date:
% Done:

0%

Estimated time:
Plus Target Version:
Release Notes:
Affected Version:
Affected Architecture:

Description

I have two hosts that have hyphens in them (ex abc-host and def-host). When I tried to add them to the static DHCP leases, I get:

The hostname cannot end with a hyphen according to RFC952 - (note the END, my hyphen is in the middle)

I changed services_dhcp_edit.php from this:
117 preg_match("/.*\-/", $_POST['hostname'], $matches);

to this:
117 preg_match("/.(-)$/", $_POST['hostname'], $matches);

This is the second time I've used a regex so there is probably a better way to do this. I tested the above code change. I can have a hyphen in the middle, but not at the end. Works for me.

Actions #1

Updated by Erik Fonnesbeck about 14 years ago

  • Status changed from New to Closed

This was already fixed on the 7th of this month.

Actions

Also available in: Atom PDF