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

Healthcheck fullBaseUrlReachable returning an incorrect error #379

Open
AntiGuide opened this issue Feb 24, 2021 · 1 comment
Open

Healthcheck fullBaseUrlReachable returning an incorrect error #379

AntiGuide opened this issue Feb 24, 2021 · 1 comment
Assignees
Labels

Comments

@AntiGuide
Copy link

Healthcheck fullBaseUrlReachable returning an incorrect error

  • Passbolt Version: 3.0.0+
  • Platform and Target:
    -- Operating system: FreeBSD 11.4
    -- PHP: 7.3.27
    -- Web server: Apache 2.4.46
    -- Database server: MariaDB 10.3.27

What you did

Manual installation with the help of https://help.passbolt.com/hosting/install/ce/from-source.html and a healthcheck.
Config was 'fullBaseUrl' => 'https://192.168.1.23' and 'base' => '/passbolt'

What happened

The healthcheck showed errors for the fullBaseUrlReachable check.

What you expected to happen

No errors as the URL is available under the base.

Suggested change

Take the App.base into account.

src/Utility/Healthchecks.php:175

Old:
$url = Configure::read('App.fullBaseUrl') . '/healthcheck/status.json';

New:
$url = Configure::read('App.fullBaseUrl') . Configure::read('App.base') . '/healthcheck/status.json';

@cedricalfonsi
Copy link
Member

Hello @AntiGuide,

Thank you for you report and the suggested code change, I confirm the issue.

I adapted it a bit, but I cannot validate it now as it requires a further investigation. It returns a false positive if the server doesn't point to this base but passbolt is configured with.

$settingAppFullBaseUrl = Configure::read('App.fullBaseUrl');
$settingAppBase = Configure::read('App.base') ? Configure::read('App.base') : "";
$url = "$settingAppFullBaseUrl$settingAppBase/healthcheck/status.json";

Your contribution is very much appreciated, don't hesitate to send us a PR next time.

@cedricalfonsi cedricalfonsi self-assigned this Feb 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants