Skip to content

[Bug] cli/health.php doesn't work when OIDC enabled #8039

@GreyChame1eon

Description

@GreyChame1eon

Describe the bug

Current healthcheck logic doesn't work with OIDC.

Here is the original checks:

if ($httpCode !== 200 || !is_string($content) || !str_contains($content, 'jsonVars') || !str_contains($content, '</html>')) {

For OIDC:

  1. httpCode will be 302 (moved)
  2. content doesn't contain "json"

This line will work:

if (($httpCode !== 302 && $httpCode !==200) || !is_string($content) || !str_contains($content, '</html>')) {

To Reproduce

  1. Enable OIDC
  2. Run cli/health.php
  3. Get exit code (echo $?)

Expected behavior

Script exit code should be 0

FreshRSS version

1.27.1

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions