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

Broken nutripatrol link through erroneous regex replacement #11181

Open
k127 opened this issue Jan 1, 2025 · 0 comments · May be fixed by #11182
Open

Broken nutripatrol link through erroneous regex replacement #11181

k127 opened this issue Jan 1, 2025 · 0 comments · May be fixed by #11182

Comments

@k127
Copy link

k127 commented Jan 1, 2025

What

HTTP 404 through removed heading slash in Nutripatrol HREF, e.g. https://world.openfoodfacts.org/nutripatrol.openfoodfacts.org/flag/product/?barcode=00000000&source=web&flavor=off.

$nutripatrol_url = $ENV{NUTRIPATROL_URL};
$nutripatrol_url =~ s/\///; # remove trailing slash if there is one

NUTRIPATROL_URL=https://nutripatrol.openfoodfacts.org/
echo $NUTRIPATROL_URL | sed 's/\///'
#  "https:/nutripatrol.openfoodfacts.org/". ⚠️ Note the missing slash

Steps to reproduce the behavior

  1. Go to Report a problem section in https://world.openfoodfacts.org/product/00000000/example-product-feel-natural
  2. Click on Report this product to our moderators button
  3. See HTTP 404

Expected behavior

  • HTTP 200
  • URL: https://nutripatrol.openfoodfacts.org/flag/product/?barcode=00000000&source=web&flavor=off

Platform (Desktop, Mobile, Hunger Games)

  • Platform "world.openfoodfacts.org"
@github-project-automation github-project-automation bot moved this to To discuss and validate in 🍊 Open Food Facts Server issues Jan 1, 2025
k127 added a commit to k127/openfoodfacts-server that referenced this issue Jan 1, 2025
@k127 k127 linked a pull request Jan 1, 2025 that will close this issue
k127 added a commit to k127/openfoodfacts-server that referenced this issue Jan 2, 2025
k127 added a commit to k127/openfoodfacts-server that referenced this issue Jan 6, 2025
k127 added a commit to k127/openfoodfacts-server that referenced this issue Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: To discuss and validate
Status: Backlog
Development

Successfully merging a pull request may close this issue.

2 participants