passbolt_api icon indicating copy to clipboard operation
passbolt_api copied to clipboard

Healthcheck is making false negative by not taking App.base into account

Open thegrima opened this issue 5 years ago • 2 comments

Healthcheck is making false negative by not taking App.base into account

  • Passbolt Version: 2.11, commit 423fda95511774b4d073db2091253cb3b6b2119e
  • Platform and Target: self-hosted -- Operating system: Debian 10 -- PHP: 7.3 -- Web server: Apache/2.4.38 (Debian) -- Database server: mysql Ver 15.1 Distrib 10.3.17-MariaDB

What you did

Fresh custom installation, using parameter App.base since passbolt is deployed into a subdirectory of our internal web-server

In config/passbolt.php :

    'App' => [
        // A base URL to use for absolute links.
        // The fully qualified domain name (including protocol) to your application’s root
        // e.g. where the passbolt instance will be reachable to your end users.
        // This information is need to render images in emails for example.
        'fullBaseUrl' => 'https://internal.fqdn.be',
        // OPTIONAL you can specify the base directory the app resides in
        // usefull for example if you are running passbolt in a subdirectory like localhost/passbolt
        // Ensure your string starts with a / and does NOT end with a /
        'base' => '/passbolt'
    ],

What happened

Healthcheck is complaining about /healthcheck/status NOT reachable. While accessing /healthcheck/status.json works OK.

What you expected to happen

Healthcheck should work

Proposed solution

In /src/Utility/Healthchecks.php line 170 : $url = Configure::read('App.fullBaseUrl') . '/healthcheck/status.json'; Replaced by : $url = Configure::read('App.fullBaseUrl') . Configure::read('App.base') . '/healthcheck/status.json';

Seems to fix the issue.

thegrima avatar Sep 17 '19 14:09 thegrima

Thank you for the report. We'll investigate and come back to you.

cedricalfonsi avatar Sep 18 '19 14:09 cedricalfonsi

Updated our passbolt to 3.2.1. Bug is still present. Fix still applies the same way.

Would a PR help ?

thegrima avatar Oct 11 '21 09:10 thegrima

Ref. PB-25720

stripthis avatar Aug 04 '23 10:08 stripthis

Hey @thegrima, this issue has been fixed and has been released with v4.2.0 (see the full changelog here). Thanks again for the report.

ishanvyas22 avatar Sep 01 '23 05:09 ishanvyas22