Project

General

Profile

Actions

Defect #20120

closed

Username can not be validated when creating an account

Added by C. R. almost 10 years ago. Updated almost 10 years ago.

Status:
Closed
Priority:
Urgent
Assignee:
-
Category:
-
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Invalid
Affected version:

Description

When trying to register a new account, the username can not be validated, the system insists that the field is empty.
Occurs when running redmine on webrick from the console and when running redmine with nginx using passenger.

Environment:
  Redmine version                3.0.3.stable
  Ruby version                   2.1.5-p273 (2014-11-13) [x86_64-linux-gnu]
  Rails version                  4.2.1
  Environment                    production
  Database adapter               Mysql2
SCM:
  Filesystem                     
Redmine plugins:
  redmine_contacts               4.0.0
Actions #1

Updated by Felix Schäfer almost 10 years ago

A friend of mine ran into this too, the request is the following:

Started POST "/account/register" for 84.56.127.146 at 2015-06-17 21:46:09 +0200
Processing by AccountController#register as HTML
 Parameters: {"utf8"=>"✓", "authenticity_token"=>"GWbmnQxYWVqKcN/utGrPbzLJa6yAhrDGD6dr5Euk50DFaXlG0MNlnRhtTkiEIQyk45ekPeEOObGI68LwSDRTOA==", "user"=>{"login"=>"foobar", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]", "firstname"=>"foobar", "lastname"=>"foobar", "mail"=>"[FILTERED]", "language"=>"de"}, "commit"=>"OK"}
 Current user: anonymous
WARNING: Can't mass-assign protected attributes for User: login
       lib/redmine/safe_attributes.rb:84:in `safe_attributes='
       app/controllers/account_controller.rb:124:in `register'
 Rendered account/register.html.erb within layouts/base (5.2ms)
Completed 200 OK in 35ms (Views: 22.1ms | ActiveRecord: 1.7ms)
Actions #2

Updated by Mischa The Evil almost 10 years ago

C. R. wrote:

When trying to register a new account, the username can not be validated, [...]

Felix Schäfer wrote:

> [...]
> WARNING: Can't mass-assign protected attributes for [...]
> 
I can confirm these and several other issues (seemingly only with new (DB) deployments of Redmine after Rails 4 upgrade). I'm still working on testing this all thoroughly though, so I haven't opened an issue for it yet (because a defect should at least mention the exact things that go wrong, and I can't do that now with the info I have currently). But, some of my preliminary findings (which btw transcends this issue's topic heavily) are:
  1. buildin groups (#17976) are not being not created (migration runs without errors or warnings) <<--- This is how I initially noticed there were troubles
  2. many 'can't mass-assign protected attribute'-errors during initial db migration ánd first visit using WEBrick (initial creation of the Anonymous user)
  3. two ruby warnings during the loading of the initial default dataset
    • ../activerecord-4.2.1/lib/active_record/associations.rb:1694: warning: already initialized constant CustomField::HABTM_Roles
    • ../activerecord-4.2.1/lib/active_record/associations.rb:1694: warning: previous definition of HABTM_Roles was here
  4. several tests seem to fail and throw errors (this is where I am now, initial tests showed the previous problems but without failures/errors during a test-suite run)
    • Trunk test run output...

With the above in mind I'll start some more research into this, primarily focusing on comparison of initial DB deployments between source:/branches/2.6-stable and source:/trunk, with clean installs of the whole stack and including the Rails 4.2.2/3.2.22 updates from yesterday. I'll provide more info (logs, cli-output, db-dumps, etc.) when I have completed these tests.

Mischa.

Actions #3

Updated by Felix Schäfer almost 10 years ago

This specific issue seems to be related to the redmine_contacts plugin, as without everything seems to work as expected.

Actions #4

Updated by Felix Schäfer almost 10 years ago

It seems the developers of the plugin are aware of a problem, for example their CRM Plugin has been updated and fixes a bug on user creation

I think this can be closed and should be escalated to the plugin authors should it not get fixed in the coming days.

Actions #5

Updated by C. R. almost 10 years ago

  • Status changed from New to Resolved

Felix has been right, the issue has been fixed in Redmine CRM 4.0.1

Actions #6

Updated by Jean-Philippe Lang almost 10 years ago

  • Status changed from Resolved to Closed
  • Resolution set to Invalid
Actions #7

Updated by Toshi MARUYAMA almost 10 years ago

  • Description updated (diff)
Actions

Also available in: Atom PDF