Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unoconv check in validateform because it will always fail on servers with open_basedir restrictions in place #73

Merged
merged 1 commit into from
Mar 11, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions CRM/Civioffice/DocumentRendererType/LocalUnoconv.php
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,10 @@ public function validateSettingsForm(CRM_Civioffice_Form_DocumentRenderer_Settin
$unoconv_binary_path = $form->_submitValues['unoconv_binary_path'];
$unoconv_lock_file_path = $form->_submitValues['unoconv_lock_file_path'];

if (!file_exists($unoconv_binary_path)) {
$form->_errors['unoconv_binary_path'] = E::ts("File does not exist. Please provide a correct filename.");
}
// There used to be a file_exists() check here for validating that the unoconv binary exists in the given path.
// We can't however check eg. /usr/bin/unoconv on a site with open_basedir restrictions in place as this check
// would always fail. There is a check running `unoconv --version` in the isReady() method() which implicitly
// covers the validation of the unconv binary being accessible.

if (!empty($lockfile_to_check)) {
if (!file_exists($unoconv_lock_file_path)) {
Expand Down
Loading