Skip to content

[BUG] Minor warning in docker logs when setting a non-numeric TRUSTED_PROXY env var #5732

@mossroy

Description

@mossroy

Describe the bug
If you set a TRUSTED_PROXY env var with a non-numeric value, like "10.0.0.0/8", there is a warning in the log:
./Docker/entrypoint.sh: 15: [: Illegal number: 10.0.0.0/8

To Reproduce
Steps to reproduce the behavior:

  1. Deploy freshrss 1.22 through its docker image
  2. pass a TRUSTED_PROXY env var, with value "10.0.0.0/8"
  3. Run the container
  4. See the first line in docker logs:

./Docker/entrypoint.sh: 15: [: Illegal number: 10.0.0.0/8

Expected behavior
There should be no warning, as this is an expected value for this env var, according to the documentation

Environment information (please complete the following information):

  • Device: Desktop
  • OS: Ubuntu 22.04
  • Browser: Firefox 118.0.2
  • FreshRSS version: 1.22
  • Database version: PostgreSQL 14.7
  • PHP version: 8.2.7
  • Installation type: docker image 1.22.0-arm (but should be the same with amd)

Additional context
This is because of the following line in entrypoint.sh file:
if [ "$TRUSTED_PROXY" -eq 0 ]; then

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions