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

[BUG] Regression with 1.22.1: feeds are not updated any more (probably related to TRUSTED_PROXY env var with space) #5792

Closed
mossroy opened this issue Oct 31, 2023 · 7 comments · Fixed by #5795
Assignees
Labels
Bug (confirmed) 🐞 issues that are reproducable
Milestone

Comments

@mossroy
Copy link
Contributor

mossroy commented Oct 31, 2023

Describe the bug
Since the upgrade of my FreshRSS instance to 1.22.1, the feeds are not updated any more.
It was working fine with docker image 1.22.0, and even with this one: https://hub.docker.com/layers/freshrss/freshrss/edge-arm/images/sha256-c62c0655f28d6e87f0433aeca0ad5fd51e14d3d2e2bf80f4e9360de35ed0909f (between 1.22.0 and 1.22.1)

To Reproduce
Steps to reproduce the behavior:

  1. Use docker image of FreshRSS 1.22.1 (I did under kubernetes, but it probably does not matter)
  2. Pass these environment variables:
  • TZ: Europe/Paris
  • CRON_MIN: 1,6,11,16,21,26,31,36,41,46,51,56
  • TRUSTED_PROXY: 10.0.0.0/8 192.168.0.0/24
  1. Start the container (and configure at least a feed if there isn't any)
  2. Wait 5 minutes to check if feeds are updated (it can be seen in stdout logs of the container, looking for string "SimplePie")

Expected behavior
Feeds should be updated

Environment information (please complete the following information):

  • Device: Desktop
  • OS: Ubuntu 22.04
  • Browser: Firefox 119.0
  • FreshRSS version: 1.22.1
  • Database version: PostgreSQL 14.9
  • PHP version: 8.2.7
  • Installation type: docker image 1.22.1-arm (but should be the same with amd), running on kubernetes (k3s)

Additional context
A workaround is to not pass TRUSTED_PROXY env var.
I suspect it's because its value contains a space, which would not be properly handled by the changes of this commit: de51f6e : some quotes might be needed around the value of each "export" line. But I'm not 100% sure it's the reason

Using 1.22.0 docker image is also a workaround

@tyrossel
Copy link

tyrossel commented Oct 31, 2023

I also have this problem, but my TRUSTED_PROXY doesn't contain any space in it.

Manual update of feeds works correctly.

Note: I also have some error oidc_check_x_forwarded_hdr: header X-Forwarded-Port received but OIDCXForwardedHeaders not configured for it, but I'm not sure it's related.

I'm currently testing with 1.22.0 to verify it was working fine before.

@Alkarex Alkarex added this to the 1.23.0 milestone Oct 31, 2023
@Alkarex Alkarex added the Bug (unconfirmed) issues thar could not reproduced yeat label Oct 31, 2023
@Dominion0815
Copy link

Dominion0815 commented Oct 31, 2023

Same Problem here with Docker and 1.22.1. Version 1.22.0 working fine!

CRON_MIN: '2,12,22,32,42,52'
TZ: Europe/Berlin
TRUSTED_PROXY: 172.16.0.0/20

same without TRUSTED_PROXY !

@snailium
Copy link

snailium commented Oct 31, 2023

Same here. I don't think this is related to TRUSTED_PROXY.

For my setup,

CRON_MIN: "*/20"
TZ: "America/Toronto"

TRUSTED_PROXY is not set. So it should be empty.

Feeds don't update.

I cannot connect to the terminal. Everytime I tried terminal, the container crashes and restarts.


Edit: I know where the problem is, after I managed to get into container terminal.

The crontab entry as following.

*/20 * * * * . /var/www/FreshRSS/Docker/env.txt;                su www-data -s /bin/sh -c 'php /var/www/FreshRSS/app/actualize_script.php'              2>> /proc/1/fd/2 > /tmp/FreshRSS.log

So I manually run the command from container terminal. And I got the following error.

bash: /var/www/FreshRSS/Docker/env.txt: line 11: unexpected EOF while looking for matching `''

On Line 11 of env.txt, it is my MariaDB password, which has a single quote in it.

@mossroy @tyrossel @Dominion0815 , please check your config for single or double quote, especially in any password.


Edit 2:

I'm using container linking to MariaDB 10. It seems docker automatically passes all MariaDB's container environment variables to FreshRSS's container. The problematic one is MARIADB_10_ENV_MARIADB_ROOT_PASSWORD.

My solution is to user MARIADB_10_ENV_MARIADB_ROOT_PASSWORD_HASH instead of password in plain text. And it seems cron starts working again.

@Alkarex
Copy link
Member

Alkarex commented Oct 31, 2023

OK, might be due to #5772 then

@Alkarex Alkarex added Bug (confirmed) 🐞 issues that are reproducable and removed Bug (unconfirmed) issues thar could not reproduced yeat labels Oct 31, 2023
@snailium
Copy link

Yes, confirm cron is working after changing plain mariadb password to password hash.

@Alkarex Alkarex self-assigned this Oct 31, 2023
Alkarex added a commit to Alkarex/FreshRSS that referenced this issue Oct 31, 2023
@Alkarex
Copy link
Member

Alkarex commented Oct 31, 2023

Fix in #5795

@Alkarex
Copy link
Member

Alkarex commented Oct 31, 2023

If you want to test, I have made an image available freshrss/freshrss:pr5795

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug (confirmed) 🐞 issues that are reproducable
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants