فهرست منبع

Public ip validation in installer script

Guillermo Espinoza 6 سال پیش
والد
کامیت
b78c3fec19
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      tools/src/ReleaseImages.php

+ 1 - 1
tools/src/ReleaseImages.php

@@ -345,7 +345,7 @@ class ReleaseImages extends Command
             $path = $dObj->dirExists()->realpath()->getPath();
             copy(getcwd() . "/hosts", $path . "/hosts");
             $this->public_ip = $input->getOption('public_ip');
-            if ($this->public_ip === false || $this->public_ip === 0) {
+            while (!filter_var($this->public_ip, FILTER_VALIDATE_IP)) {
                 $helper = $this->getHelper('question');
                 $question = new Question('IP pública del cliente para acceder a Flowdat ? (Default: 127.0.0.1)', '127.0.0.1');
                 $this->public_ip = $helper->ask($input, $output, $question);