[checkmk-commits] Check_MK Git: check_mk: Fixed ipaddress regex

Lars Michelsen lm at mathias-kettner.de
Tue Apr 2 13:22:11 CEST 2013


Module: check_mk
Branch: master
Commit: 52c7073aa68959587a9dd96aa3e6843a7f789cc2
URL:    http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=52c7073aa68959587a9dd96aa3e6843a7f789cc2

Author: Lars Michelsen <lm at mathias-kettner.de>
Date:   Tue Apr  2 13:22:03 2013 +0200

Fixed ipaddress regex

---

 web/htdocs/js/search.js |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/web/htdocs/js/search.js b/web/htdocs/js/search.js
index 741e250..db828b8 100644
--- a/web/htdocs/js/search.js
+++ b/web/htdocs/js/search.js
@@ -278,7 +278,7 @@ function is_ipaddress(add, prefix) {
     if (prefix)
         return add.match(/^[0-9]{1,3}(\.[0-9]{1,3}){0,2}\.?$/);
     else
-        return add.match(/^([1-9][0-9]{0,2}\.){3}[1-9][0-9]{0,2}$/);
+        return add.match(/^([0-9]{1,3}\.){3}[0-9]{1,3}$/);
 }
 
 function mkSearchGetUrl(objType, objName, objSite, numMatches) {



More information about the checkmk-commits mailing list