Defect #11850

Can't create a user from ldap by on-the-fly on the redmine server using URI prefix

Added by Hong Choi about 5 years ago. Updated about 5 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Etienne Massip% Done:

0%

Category:Accounts / authentication
Target version:2.1.1
Resolution:Fixed Affected version:2.1.0

Description

Hello, I've upgraded my redmine server from 1.3.X to 2.1.0, and encounted weird problem.

  • Problem
    • Existing users can login with their ldap account.
    • But when new users try to create a new one, redmine displays '404 not found' error.
    • Redmine log
      Processing by AccountController#login as HTML
        Parameters: {"back_url"=>"http://[MyServerDomain]/redmine/projects/[MyProject]/wiki", "login"=>"로그인 »", "utf8"=>"✓", "password"=>"[FILTERED]", "username"=>"[new_user_id]", "authenticity_token"=>"[Token]"}
        Current user: anonymous
      Missing template, responding with 404
        Rendered common/error.html.erb within layouts/base (0.1ms)
      Completed 404 Not Found in 62ms (Views: 4.6ms | ActiveRecord: 0.0ms)
      
  • Work around
    • modify app/controllers/account_controller.rb
      def onthefly_creation_failed(user, auth_source_options = { })
          @user = user
          session[:auth_source_registration] = auth_source_options unless auth_source_options.empty?
          #render register_path <-- register_path's value : "/redmine/account/register" 
          render "/account/register" # remove the prefix
      end
      
  • Server info
    • OS : ubuntu 12.04 / apache 2.2.22
      <Directory /var/www/redmine>
        RackBaseURI /redmine
        RackEnv production
        PassengerResolveSymlinksInDocumentRoot on
      </Directory>
      
    • Mysql 5.5.24
    • ruby 1.8.7
    • rails 3.2.8

Associated revisions

Revision 10412
Added by Jean-Philippe Lang about 5 years ago

Fixed #onthefly_creation_failed broken by r9940 (#11850).

History

#1 Updated by Etienne Massip about 5 years ago

  • Status changed from New to Confirmed

Looks like a regression introduced with r9940.

#2 Updated by Etienne Massip about 5 years ago

  • Target version set to Candidate for next minor release

#3 Updated by Jean-Philippe Lang about 5 years ago

  • Target version changed from Candidate for next minor release to 2.1.1

#4 Updated by Jean-Philippe Lang about 5 years ago

  • Status changed from Confirmed to Resolved
  • Resolution set to Fixed

Etienne Massip wrote:

Looks like a regression introduced with r9940.

Very true, I went too fast and replaced a render argument with a route. The test was still passing because #render accepts a string.

#5 Updated by Jean-Philippe Lang about 5 years ago

  • Status changed from Resolved to Closed

Merged into 2.1-stable.

#6 Updated by cferronferm John about 5 years ago

  • Assignee set to Etienne Massip

Also available in: Atom PDF