Skip to content

N°10179 - MTP/upgrade not working - #1101

Merged
GiN2K merged 2 commits into
support/3.3.0from
issue/10179-MTP-and-upgrade-not-working
Oct 28, 2026
Merged

GiN2K merged 2 commits into
support/3.3.0from
issue/10179-MTP-and-upgrade-not-working

Conversation

@GiN2K

@GiN2K GiN2K commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

Base information

Question Answer
Related to a SourceForge thread / Another PR / A GitHub Issue / Combodo ticket? N°10179
Type of change? Bug fix

Symptom (bug) / Objective (enhancement)

When installing or upgrading iTop 3.3.0 in a directory in windows whose path contains spaces, the compatibility check fails with the following error: Data consistency check failed

Reproduction procedure (bug)

  1. Use a Windows environment with WAMP and PHP 8.3.14 Install iTop 3.3.0 in a directory whose path contains spaces.
  2. Run the setup again to perform an upgrade.
  3. Observe that the compatibility check fails with: Data consistency check failed

Cause (bug)

The issue is caused by an improperly escaped file path in a background command executed using PHP's exec() function.
If the path contains a space and is not properly quoted, the command interpreter treats the path as separate arguments.

Proposed solution (bug and enhancement)

Use PHP's escapeshellarg() function to properly escape the script path before passing it to the command executed through exec().

Checklist before requesting a review

  • If my PR is a bug fix or an enhancement, I opened an issue that got reviewed and approved by Combodo
  • I have performed a self-review of my code
  • I have tested all changes I made on an iTop instance
  • I have added a unit test, otherwise I have explained why I couldn't
  • Is the PR clear and detailed enough so anyone can understand without digging in the code?

Copilot AI balanced review requested due to automatic review settings October 28, 2026 10:43
@CombodoApplicationsAccount CombodoApplicationsAccount added the internal Work made by Combodo label Oct 28, 2026
@GiN2K
GiN2K requested a review from rquetiez October 28, 2026 10:44
@GiN2K GiN2K changed the title fixed by escaping args N°10179 - MTP/upgrade not working Oct 28, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Applying escapeshellarg() to an already quoted php_path makes the quotes part of the executable name on Unix, breaking previously supported values; preserve executable handling while retaining script-path escaping.

1 open issue
What changed in this PR

This PR addresses setup compatibility-check failures when iTop is installed in a Windows directory containing spaces.

Changes:

  • Escapes the PHP executable and model-reflection script path when constructing the background command.
  • Retains escaping of the environment argument.
File Description
setup/​feature_removal/​ModelReflectionSerializer.php Updates shell argument escaping for the model-reflection command used during setup.

Review effort: Balanced

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@GiN2K
GiN2K merged commit 25598e3 into support/3.3.0 Oct 28, 2026
@GiN2K
GiN2K deleted the issue/10179-MTP-and-upgrade-not-working branch October 28, 2026 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal Work made by Combodo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants