Skip to content

N°8782 - Union queries allow all data#807

Merged
eespie merged 2 commits intosupport/3.2from
issue/8782_Union_queries
Feb 23, 2026
Merged

N°8782 - Union queries allow all data#807
eespie merged 2 commits intosupport/3.2from
issue/8782_Union_queries

Conversation

@eespie
Copy link
Member

@eespie eespie commented Feb 18, 2026

Base information

https://support.combodo.com/pages/UI.php?operation=details&class=Bug&id=8782
bug fix

Symptom (bug) / Objective (enhancement)

AllowAllData bad behaviour on unions

Reproduction procedure (bug)

See bug

Checklist before requesting a review

  • 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 digging in the code?

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a bug in DBUnionSearch::AllowAllData() where the method was not properly propagating the $bAllowAllData parameter to child searches. When calling AllowAllData(false) on a union query, it would incorrectly default to true for all child searches, causing data to be exposed that should have been hidden.

Changes:

  • Fixed DBUnionSearch::AllowAllData() to pass the $bAllowAllData parameter to child searches
  • Added unit test to verify the fix works correctly for both true and false values

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
core/dbunionsearch.class.php Fixed bug by passing $bAllowAllData parameter to child searches instead of using default value
tests/php-unit-tests/unitary-tests/core/DBSearchTest.php Added test case to verify AllowAllData works correctly on union queries

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Molkobain Molkobain added this to the 3.2.3 milestone Feb 18, 2026
Copy link
Contributor

@Molkobain Molkobain left a comment

Choose a reason for hiding this comment

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

You pointed the PR to the develop branch when it should be support/3.2 shouldn't it?
Mind to also check your base branch, you might have to do a "rebase onto" if you need to switch it from develop to support/3.2, ask @steffunky for a hand if necessary, he knows the procedure :)

@eespie eespie changed the base branch from develop to support/3.2 February 18, 2026 10:06
@eespie eespie changed the title 8782 - Union queries allow all data N°8782 - Union queries allow all data Feb 23, 2026
@eespie eespie merged commit 48e5845 into support/3.2 Feb 23, 2026
@eespie eespie deleted the issue/8782_Union_queries branch February 23, 2026 14:10
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.

5 participants