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

/.well-known/change-password doesn't work #9223

Closed
hangy opened this issue Oct 28, 2023 · 0 comments · Fixed by #9285
Closed

/.well-known/change-password doesn't work #9223

hangy opened this issue Oct 28, 2023 · 0 comments · Fixed by #9285
Labels
🐛 bug This is a bug, not a feature request. .well-known

Comments

@hangy
Copy link
Member

hangy commented Oct 28, 2023

What

Steps to reproduce the behavior

  1. Go to https://world.openfoodfacts.org/.well-known/change-password
  2. See 404 Not Found page from nginx

Expected behavior

  • The user should be redirected to /cgi/change_password.pl.

Additional context

The feature was originally implemented in #4149, and is probably broken since #5685, because .well-known was added to directories to be used for static files, probably for assetlinks.json.

A possible fix is to add the redirect to nginx.com instead of

# https://github.com/openfoodfacts/openfoodfacts-server/issues/4140
elsif ((scalar(@components) == 2) and ($components[0] eq '.well-known') and ($components[1] eq 'change-password')) {
$request_ref->{redirect} = $formatted_subdomain . '/cgi/change_password.pl';
$log->info('well-known password change page - redirecting', {redirect => $request_ref->{redirect}})
if $log->is_info();
redirect_to_url($request_ref, 307, $request_ref->{redirect});
}

@hangy hangy added 🐛 bug This is a bug, not a feature request. .well-known labels Oct 28, 2023
teolemon pushed a commit that referenced this issue Nov 15, 2023
fix: /.well-known/change-password #9223
alexgarel pushed a commit that referenced this issue Nov 21, 2023
fix: /.well-known/change-password #9223
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug This is a bug, not a feature request. .well-known
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant