You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by ra...@apache.org on 2018/09/21 22:42:55 UTC
[trafficcontrol] 02/03: Altering postinstall cdn name regex to
include underscores
This is an automated email from the ASF dual-hosted git repository.
rawlin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git
commit 9ac409904987ad0b52e3de26b79422b9688bbb8e
Author: Dylan Souza <dy...@comcast.com>
AuthorDate: Fri Sep 21 18:08:14 2018 +0000
Altering postinstall cdn name regex to include underscores
---
traffic_ops/install/bin/input.json | 2 +-
traffic_ops/install/lib/InstallUtils.pm | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/traffic_ops/install/bin/input.json b/traffic_ops/install/bin/input.json
index 9ff17d2..871b139 100644
--- a/traffic_ops/install/bin/input.json
+++ b/traffic_ops/install/bin/input.json
@@ -136,7 +136,7 @@
"config_var":"tm.url"
},
{
- "Human-readable CDN Name. (No whitespace, please)":"kabletownCdn",
+ "Human-readable CDN Name. (No whitespace, please)":"kabletown_cdn",
"config_var":"cdn_name"
},
{
diff --git a/traffic_ops/install/lib/InstallUtils.pm b/traffic_ops/install/lib/InstallUtils.pm
index 738c270..22545f2 100644
--- a/traffic_ops/install/lib/InstallUtils.pm
+++ b/traffic_ops/install/lib/InstallUtils.pm
@@ -131,7 +131,7 @@ sub randomWord {
sub sanitize{
my ($promptString, $userInput) = @_;
if (index($promptString, "Human-readable CDN Name") != -1){
- if ($userInput =~ m/[^-a-zA-Z0-9]/){
+ if ($userInput =~ m/[^-a-zA-Z0-9_.]/){
print "Invalid characters in user input. Try again.\n\n";
return false;
}