Your project uses dangerous command injection functions

More information: https://insight.symfony.com/what-we-analyse/php.use_command_injection_function

  1. ];
  2. $cli = null;
  3. if (function_exists('shell_exec')) {
  4. $out = @shell_exec('php -r ' . escapeshellarg('echo (int)extension_loaded("apcu"), ",", (int)ini_get("apc.enabled"), ",", (int)ini_get("apc.enable_cli"), ",", (int)(function_exists("apcu_enabled") && apcu_enabled());') . ' 2>/dev/null');
    shell_exec() is vulnerable to command injection attacks. Use the Symfony Process component instead.
    Time to fix: about 4 hours
    Read doc Permalink Copy Prompt
    Last edited by clicshopping
  5. if (is_string($out) && substr_count($out, ',') === 3) {
  6. [$loaded, $enabled, $enable_cli, $usable] = explode(',', trim($out));
  7. $cli = [
  8. 'loaded' => (bool)$loaded,

Your project uses non-strict array lookups 4

More information: https://insight.symfony.com/what-we-analyse/php.strict_array_lookup

  1. } elseif ($already_sent) {
  2. $content .= '
  3. <span class="badge bg-success">' . $this->app->getDef('badge_transmitted') . '</span>
  4. &nbsp;<span class="text-success small">' . $this->app->getDef('text_transmitted_notice') . '</span>
  5. ';
  6. } elseif (!in_array($current_invoice_status_id, [EInvoiceService::STATUS_INVOICE, EInvoiceService::STATUS_CANCEL, EInvoiceService::STATUS_CREDIT_NOTE])) {
    in_array() should be called with the third parameter set to true to enable strict comparison and avoid type juggling bugs.
    Time to fix: about 15 minutes
    Read doc Permalink Copy Prompt
    Last edited by clicshopping
  7. $content .= '
  8. <span class="badge bg-warning text-dark">' . $this->app->getDef('badge_pending') . '</span>
  9. &nbsp;<span class="text-muted small">' . $this->app->getDef('text_pending_notice') . '</span>
  10. ';
  11. } else {
  1. if ($this->previousInvoiceStatus() === $new_invoice_status) {
  2. return false;
  3. }
  4. // Only process actionable statuses
  5. if (!in_array($new_invoice_status, [
    in_array() should be called with the third parameter set to true to enable strict comparison and avoid type juggling bugs.
    Time to fix: about 15 minutes
    Read doc Permalink Copy Prompt
    Last edited by clicshopping
  6. EInvoiceService::STATUS_INVOICE,
  7. EInvoiceService::STATUS_CANCEL,
  8. EInvoiceService::STATUS_CREDIT_NOTE,
  9. ])) {
  10. return false;
  1. $msg = $this->app->getDef('error_oauth2_failed') . ' #' . $order_id;
  2. $this->writeOrderHistory($order_id, '[ERROR] ' . $msg, false);
  3. return $this->failure($msg);
  4. }
  5. $doc_type = in_array($invoice_status, [self::STATUS_CANCEL, self::STATUS_CREDIT_NOTE]) ? self::TYPE_CREDIT_NOTE : self::TYPE_INVOICE;
    in_array() should be called with the third parameter set to true to enable strict comparison and avoid type juggling bugs.
    Time to fix: about 15 minutes
    Read doc Permalink Copy Prompt
    Last edited by clicshopping
  6. $payload = $this->buildPayload($order_id, $customer, $info, $products, $totals, $doc_type);
  7. if ($payload === null) {
  8. $msg = $this->app->getDef('error_payload_failed');
  9. $this->writeOrderHistory($order_id, '[ERROR] ' . $msg, false);
  1. {
  2. if (!$this->isEnabled()) {
  3. return $this->skip($this->app->getDef('skip_module_disabled'));
  4. }
  5. if (!in_array($invoice_status, [self::STATUS_INVOICE, self::STATUS_CANCEL, self::STATUS_CREDIT_NOTE])) {
    in_array() should be called with the third parameter set to true to enable strict comparison and avoid type juggling bugs.
    Time to fix: about 15 minutes
    Read doc Permalink Copy Prompt
    Last edited by clicshopping
  6. return $this->skip($this->app->getDef('skip_status_not_actionable') . ' (' . $invoice_status . ')');
  7. }
  8. if ($this->isAlreadySent($order_id)) {
  9. return $this->skip($this->app->getDef('skip_already_sent') . ' #' . $order_id);