🐛 N°8838 - fix testing mysqldump custom path#770
Conversation
|
My first PR ever ! 😅🤞 |
|
Youhou, right in time for Hacktoberfest 😄 |
|
Hey @favincen, could you please rebase your branch on support/3.2 ? Since it's related to a security fix, we'll probably publish your fix on 3.2.3 |
af84362 to
fbee01f
Compare
fbee01f to
8527eec
Compare
|
Sorry I messed up while trying to rebase ! 🫢 |
fd27693 to
8527eec
Compare
No problem, thanks for trying :) I just fixed it |
|
Thank you for your PR @favincen ! I merged it, and the fix will be in 3.2.3 (and 3.3) |
Base information
Symptom (bug)
Regression: testing of a correct custom path to mysqldump fails with error 'mysqldump not found in ...'.

Reproduction procedure (bug)
Cause (bug)
commit "N°8379 - fix backup issue" introduced a security test on content of parameter 'mysql_bindir' of 'itop-backup' module configuration, but with incorrect quoting : double quote are added to the command before testing it exist, but file_exists() doesn't need and doesn't interpret these quotes and fails to find the file.
Still, quoting is needed before returing the command for system call to properly handle cases where the path contains spaces or other characters shell would interpret as separators.
Proposed solution (bug and enhancement)
postpone quoting the command so that file_exist() can have a unquotted command to test
Checklist before requesting a review
Checklist of things to do before PR is ready to merge