Commit e94789a8 authored by Leigh B. Stoller's avatar Leigh B. Stoller
Browse files

Fix silly logic bug that was causing netbuild generated NS files to

fail.
parent e25a0412
...@@ -146,20 +146,20 @@ elseif (!TBvalid_description($formfields[exp_description])) { ...@@ -146,20 +146,20 @@ elseif (!TBvalid_description($formfields[exp_description])) {
# NS File. There is a bunch of stuff here for Netbuild, which uses the # NS File. There is a bunch of stuff here for Netbuild, which uses the
# beginexp form as a backend. Switch to XML interface someday ... # beginexp form as a backend. Switch to XML interface someday ...
# #
if (isset($formfields[nsref])) {
if ($formfields[nsref] == "" ||
!preg_match("/^\d+$/", $formfields[nsref])) {
$errors["NS File Reference"] = "Invalid characters";
}
}
if (isset($formfields[guid])) { if (isset($formfields[guid])) {
if ($formfields[guid] == "" || if ($formfields[guid] == "" ||
!preg_match("/^\d+$/", $formfields[guid])) { !preg_match("/^\d+$/", $formfields[guid])) {
$errors["NS File GUID"] = "Invalid characters"; $errors["NS File GUID"] = "Invalid characters";
} }
}
if (isset($formfields[nsref])) {
if ($formfields[nsref] == "" ||
!preg_match("/^\d+$/", $formfields[nsref])) {
$errors["NS File Reference"] = "Invalid characters";
}
$nsfilelocale = "nsref"; $nsfilelocale = "nsref";
} }
if (isset($formfields[exp_localnsfile]) && elseif (isset($formfields[exp_localnsfile]) &&
$formfields[exp_localnsfile] != "") { $formfields[exp_localnsfile] != "") {
if (!preg_match("/^([-\@\w\.\/]+)$/", $formfields[exp_localnsfile])) { if (!preg_match("/^([-\@\w\.\/]+)$/", $formfields[exp_localnsfile])) {
$errors["Server NS File"] = "Pathname includes illegal characters"; $errors["Server NS File"] = "Pathname includes illegal characters";
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment