XoopsModules25x/xoopsinfo

View on GitHub

Showing 1,065 of 16,781 total issues

Avoid deeply nested control flow statements.
Open

                            if (defined('PSI_SHOW_DEVICES_SERIAL') && PSI_SHOW_DEVICES_SERIAL) {
                                if (isset($nlocate[1]) && isset($nsize[1])) {
                                    $dev->setSerial(trim(substr($buf, $nlocate[1], $nsize[1])));
                                }
                            }
Severity: Major
Found in phpsysinfo/includes/os/class.Linux.inc.php - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                                if (isset($cpu_tmp[$cpu])) {
                                    $buf2 = $line[2];
    
                                    $ab = 0;
                                    $ac = 0;
    Severity: Major
    Found in phpsysinfo/includes/os/class.Linux.inc.php - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                              if ($cpulist === null) $cpulist = @parse_ini_file(PSI_APP_ROOT."/data/cpus.ini", true);
      Severity: Major
      Found in phpsysinfo/includes/os/class.Linux.inc.php - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                                        if (!defined('PSI_HIDE_NETWORK_MACADDR') || !PSI_HIDE_NETWORK_MACADDR) $dev->setInfo(preg_replace('/:/', '-', strtoupper($ar_buf2[1])));
        Severity: Major
        Found in phpsysinfo/includes/os/class.Haiku.inc.php - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                                      if (CommonFunctions::readReg($this->_reg, "HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Enum\\".$strInstanceID."\\FriendlyName", $strName, false)) {
                                          $cname = str_replace(array('(', ')', '#'), array('[', ']', '_'), $strName); //convert to canonical
                                          if (!isset($aliases[$cname])) { // duplicate checking
                                              $aliases[$cname]['id'] = $netID;
                                              $aliases[$cname]['name'] = $strName;
          Severity: Major
          Found in phpsysinfo/includes/os/class.WINNT.inc.php - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                                if (preg_match('/\n(\d+)\n(\d+)\n(\d+)$/', $values, $out_dig)) {
                                    $size = $out_dig[1];
                                    $used = $out_dig[2];
                                    $free = $out_dig[3];
                                    if ($used + $free == $size) {
            Severity: Major
            Found in phpsysinfo/includes/os/class.WINNT.inc.php - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                          if (isset($nlocate[4]) && isset($nsize[4])) {
                                              if (preg_match('/\/\s*([0-9\.]+)\s*(B|KB|MB|GB|TB|PB)$/', str_replace(',', '.', trim(substr($buf, $nlocate[4], $nsize[4]))), $tmpbuf)) {
                                                  switch ($tmpbuf[2]) {
                                                      case 'B':
                                                          $dev->setCapacity($tmpbuf[1]);
              Severity: Major
              Found in phpsysinfo/includes/os/class.Linux.inc.php - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                            if ($arrBuff1 > 0) { //openSUSE fix
                                                $dev->setCpuSpeedMax($arrBuff1);
                                            }
                Severity: Major
                Found in phpsysinfo/includes/os/class.Linux.inc.php - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                                  if (strlen($procname)>0) {
                                                      $dev->setModel($procname);
                                                  }
                  Severity: Major
                  Found in phpsysinfo/includes/os/class.Linux.inc.php - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                                if (preg_match("/ vmx/", $arrBuff1)) {
                                                    $dev->setVirt("vmx");
                                                } elseif (preg_match("/ svm/", $arrBuff1)) {
                                                    $dev->setVirt("svm");
                                                } elseif (preg_match("/ hypervisor/", $arrBuff1)) {
                    Severity: Major
                    Found in phpsysinfo/includes/os/class.Linux.inc.php - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                                  if ($ali[$name]['id']==$NetworkAdapterConfiguration['SettingID']) {
                                                      $mininame = $ali[$name]['name'];
                                                      if (preg_match('/^isatap\.({[A-Fa-f0-9\-]*})/', $mininame))
                                                          $mininame="Microsoft ISATAP Adapter";
                                                      elseif (preg_match('/\s-\s([^-]*)$/', $mininame, $ar_name))
                      Severity: Major
                      Found in phpsysinfo/includes/os/class.WINNT.inc.php - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                                if ($product!==null) {
                                                    $usbarray[$usbid]['product'] = $product;
                                                }
                        Severity: Major
                        Found in phpsysinfo/includes/os/class.Linux.inc.php - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                                  if (defined('PSI_SHOW_NETWORK_INFOS') && PSI_SHOW_NETWORK_INFOS) {
                                                      if (($speedinfo = $device['CurrentBandwidth']) >= 1000000) {
                                                          if ($speedinfo > 1000000000) {
                                                              $dev->setInfo(($dev->getInfo()?$dev->getInfo().';':'').round($speedinfo/1000000000, 2)."Gb/s");
                                                          } else {
                          Severity: Major
                          Found in phpsysinfo/includes/os/class.WINNT.inc.php - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                                            if (!defined('PSI_HIDE_NETWORK_MACADDR') || !PSI_HIDE_NETWORK_MACADDR) $macaddr = preg_replace('/:/', '-', strtoupper($ar_buf2[1]));
                            Severity: Major
                            Found in phpsysinfo/includes/os/class.Linux.inc.php - About 45 mins to fix

                              Avoid deeply nested control flow statements.
                              Open

                                                          if (!defined('PSI_HIDE_NETWORK_MACADDR') || !PSI_HIDE_NETWORK_MACADDR) $dev->setInfo(($dev->getInfo()?$dev->getInfo().';':'').preg_replace('/:/', '-', strtoupper($ar_buf2[1])));
                              Severity: Major
                              Found in phpsysinfo/includes/os/class.NetBSD.inc.php - About 45 mins to fix

                                Avoid deeply nested control flow statements.
                                Open

                                                        if ($manufacturer!==null) {
                                                            $usbarray[$usbid]['manufacturer'] = $manufacturer;
                                                        }
                                Severity: Major
                                Found in phpsysinfo/includes/os/class.Linux.inc.php - About 45 mins to fix

                                  Avoid deeply nested control flow statements.
                                  Open

                                                              if ($arrBuff1 > 0) { //openSUSE fix
                                                                  $dev->setCpuSpeed($arrBuff1);
                                                                  $speedset = true;
                                                              }
                                  Severity: Major
                                  Found in phpsysinfo/includes/os/class.Linux.inc.php - About 45 mins to fix

                                    Avoid deeply nested control flow statements.
                                    Open

                                                               for ($i = 0; $i < $total; $i++) {
                                                                   if (CommonFunctions::rfts($sizelist[$i], $buf, 1, 4096, false) && (($buf=trim($buf)) != "") && ($buf > 0)) {
                                                                       $dev->setCapacity($buf * 512);
                                                                       break;
                                                                   }
                                    Severity: Major
                                    Found in phpsysinfo/includes/os/class.Linux.inc.php - About 45 mins to fix

                                      Avoid deeply nested control flow statements.
                                      Open

                                                              if (($txbytes < 0) && ($rxbytes < 0)) {
                                                                  $txbytes += 4294967296;
                                                                  $rxbytes += 4294967296;
                                                              } elseif ($txbytes < 0) {
                                                                  if ($device['BytesTotalPersec'] > $rxbytes)
                                      Severity: Major
                                      Found in phpsysinfo/includes/os/class.WINNT.inc.php - About 45 mins to fix

                                        Avoid deeply nested control flow statements.
                                        Open

                                                                if (($impl === '0x41')
                                                                   && (($_hard === 'BCM2708') || ($_hard === 'BCM2835') || ($_hard === 'BCM2709') || ($_hard === 'BCM2836') || ($_hard === 'BCM2710') || ($_hard === 'BCM2837') || ($_hard === 'BCM2711') || ($_hard === 'BCM2838'))
                                                                   && ($_revi !== null)) { // Raspberry Pi detection (instead of 'cat /proc/device-tree/model')
                                                                    if ($raslist === null) $raslist = @parse_ini_file(PSI_APP_ROOT."/data/raspberry.ini", true);
                                                                    if ($raslist && !preg_match('/[^0-9a-f]/', $_revi)) {
                                        Severity: Major
                                        Found in phpsysinfo/includes/os/class.Linux.inc.php - About 45 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language