Trying to add a CNAME to a DNS entry given to me by another provider, which includes "-" in the name.
The entry resolves. Its a valid DNS entry.
However, ispCP is complaining
Cannot validate CNAME record. Reason 'Use of disallowed char("-") in CNAME'.
when I try to add it.
Anyone have a work around, or quick hack? I need to get this up and running soon.
thanks
ispcCP 1.07
Deb Lenny 64bit.
EDIT:
/var/www/ispcp/gui/client/dns_edit.php has the following code:
Code:
function validate_CNAME($record, &$err = null) {
if (preg_match('~([^a-z,A-Z,0-9\.])~u', $record['dns_cname'], $e)) {
$err .= sprintf(tr('Use of disallowed char("%s") in CNAME'), $e[1]);
return false;
}
.
.
.
so it looks like an easy fix... but that test is there for a reason
Does anyone know if I modify the preg_match to allow the '-' to pass unimpeded, will that cause anything else to fail further on?
Thx