N°8782 - Union queries allow all data#807
Conversation
There was a problem hiding this comment.
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$bAllowAllDataparameter to child searches - Added unit test to verify the fix works correctly for both
trueandfalsevalues
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
left a comment
There was a problem hiding this comment.
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 :)
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