Bug #718
closedredmine: unable to register a new account
100%
Description
https://www.redmine.org/account/register https://projects.duckcorp.org/account/register displays an HTTP 500 error.
Redmine logs (/var/log/redmine/dc/production.log
) contains:
Processing by WelcomeController#index as HTML Current user: anonymous Rendering plugins/recaptcha/app/views/account/register.html.erb within layouts/base Rendered plugins/recaptcha/app/views/account/register.html.erb within layouts/base (70.2ms) Completed 500 Internal Server Error in 232ms (ActiveRecord: 8.6ms) ActionView::Template::Error (No site key specified.): 26: <p><%= custom_field_tag_with_label :user, value %></p> 27: <% end %> 28: 29: <%= recaptcha_tags :hl=>current_language, :public_key => Setting.plugin_recaptcha['recaptcha_public_key'] %> 30: </div> 31: 32: <%= submit_tag l(:button_submit) %> plugins/recaptcha/app/views/account/register.html.erb:29:in `block in _plugins_recaptcha_app_views_account_register_html_erb___990786606388501379_47129660060800' app/helpers/application_helper.rb:1242:in `labelled_form_for' plugins/recaptcha/app/views/account/register.html.erb:3:in `_plugins_recaptcha_app_views_account_register_html_erb___990786606388501379_47129660060800' lib/redmine/sudo_mode.rb:63:in `sudo_mode'
Updated by Pierre-Louis Bonicoli almost 4 years ago
I added this file /usr/share/redmine/config/initializers/recaptcha.rb
:
Recaptcha.configure do |config| config.site_key = Setting.plugin_recaptcha['recaptcha_public_key'] config.secret_key = Setting.plugin_recaptcha['recaptcha_private_key'] end
and restarted apache2 (systemctl restart apache2.service
) in order to fix this issue. I don't know why /var/lib/redmine/dc/tmp/restart.txt
wasn't sufficient.
First I try to put the file below /var/lib/redmine/dc/config/initializers/
but it wasn't taken in account.
Updated by Pierre-Louis Bonicoli almost 4 years ago
I added the following file (/root/patches/redmine/recaptcha.patch
):
--- /dev/null 2021-02-10 12:46:26.160848555 +0100 +++ config/initializers/recaptcha.rb 2021-02-12 00:23:03.424350312 +0100 @@ -0,0 +1,4 @@ +Recaptcha.configure do |config| + config.site_key = Setting.plugin_recaptcha['recaptcha_public_key'] + config.secret_key = Setting.plugin_recaptcha['recaptcha_private_key'] +end
Updated by Pierre-Louis Bonicoli almost 4 years ago
- Status changed from New to Resolved
- Assignee set to Pierre-Louis Bonicoli
- % Done changed from 0 to 100
Updated by Marc Dequènes almost 4 years ago
- Status changed from Resolved to In Progress
- Assignee changed from Pierre-Louis Bonicoli to Marc Dequènes
Considering information about the patch and versioning that I clarified in #719, there is an old patch redmine_recaptcha_api_change.patch that was created for Buster compatibility and reverts the plugin code for the API that is supported in Debian at the time. Now ruby-recaptcha is version 4.11.1-2 and I believe this is not needed anymore. Currently the old patch is fully applied, so maybe simply unapplying it would suffice and your patch might not be necessary. Reopening to test this.
Updated by Marc Dequènes almost 4 years ago
Without changing anything yet I tried to register and did not get any recaptcha.
Updated by Marc Dequènes almost 4 years ago
Frack, I followed your link to www.redmine.org… this is not our instance.
Updated by Marc Dequènes almost 4 years ago
So this works and I'm going to update the Ansible rules now.
Updated by Marc Dequènes almost 4 years ago
- Status changed from In Progress to Resolved
Applied in changeset duckcorp-infra|24cf78d5ef97add3262c44a6619699557bb725d2.
Updated by Pierre-Louis Bonicoli over 3 years ago
Pierre-Louis Bonicoli wrote:
I added this file
/usr/share/redmine/config/initializers/recaptcha.rb
:
[...]and restarted apache2 (
systemctl restart apache2.service
) in order to fix this issue. I don't know why/var/lib/redmine/dc/tmp/restart.txt
wasn't sufficient.First I try to put the file below
/var/lib/redmine/dc/config/initializers/
but it wasn't taken in account.
Using strace
, I looked for the path used by redmine. The result is: /usr/share/redmine/tmp/restart.txt
(incidentally i discovered the /usr/share/redmine/tmp/always_restart.txt
path).
restart.txt
path:
- either application root path (
PassengerAppRoot
) should be defined - or the
PassengerRestartDir
should be defined as an absolute path
I will open another issue for that.
Updated by Pierre-Louis Bonicoli over 3 years ago
- Related to Enhancement #732: passenger: a better path for restart.txt added
Updated by Pierre-Louis Bonicoli over 2 years ago
- Related to Bug #776: Users are unable to register to projects.duckcorp.org added