summaryrefslogtreecommitdiffstats
path: root/web/attachments/199141-is_hostname.diff
diff options
context:
space:
mode:
Diffstat (limited to 'web/attachments/199141-is_hostname.diff')
-rw-r--r--web/attachments/199141-is_hostname.diff16
1 files changed, 16 insertions, 0 deletions
diff --git a/web/attachments/199141-is_hostname.diff b/web/attachments/199141-is_hostname.diff
new file mode 100644
index 0000000..8d6e498
--- /dev/null
+++ b/web/attachments/199141-is_hostname.diff
@@ -0,0 +1,16 @@
1Index: plugins-scripts/utils.pm.in
2===================================================================
3RCS file: /cvsroot/nagiosplug/nagiosplug/plugins-scripts/utils.pm.in,v
4retrieving revision 1.9
5diff -u -r1.9 utils.pm.in
6--- plugins-scripts/utils.pm.in 19 Oct 2006 18:44:53 -0000 1.9
7+++ plugins-scripts/utils.pm.in 20 Oct 2006 15:57:37 -0000
8@@ -76,7 +76,7 @@
9
10 sub is_hostname {
11 my $host1 = shift;
12- if ($host1 && $host1 =~ m/^([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+|[a-zA-Z0-9]+(\.[a-zA-Z0-9]+)*)$/) {
13+ if ($host1 && $host1 =~ m/^([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+|[a-zA-Z0-9][-a-zA-Z0-9]+(\.[a-zA-Z0-9][-a-zA-Z0-9]+)*)$/) {
14 return 1;
15 }else{
16 return 0;