プロジェクト

全般

プロフィール

Vote #69344

完了

MailHandler user creation for unknown_user impossible due to diverging length-limits of login and email fields

Admin Redmine さんがほぼ4年前に追加. ほぼ4年前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
Email receiving_29
対象バージョン:
開始日:
2011/02/25
期日:
進捗率:

0%

予定工数:
category_id:
29
version_id:
36
issue_org_id:
7717
author_id:
29190
assigned_to_id:
1
comments:
6
status_id:
5
tracker_id:
1
plus1:
1
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

On redmine-1.1.1 it is not possible to create a user by sending a ticket by mail.

  • The maximum email length is 60 chars.
  • Login is generated from the email address, which has a size of only 30 chars.
--- a/redmine-1.1.1/app/models/user.rb
+++ b/redmine-1.1.1/app/models/user.rb
@@ -67,7 +67,7 @@ class User < Principal
   validates_uniqueness_of :mail, :if => Proc.new { |user| !user.mail.blank? }, :case_sensitive => false
   # Login must contain lettres, numbers, underscores only
   validates_format_of :login, :with => /^[a-z0-9_\-@\.]*$/i
-  validates_length_of :login, :maximum => 30
+  validates_length_of :login, :maximum => 60
   validates_format_of :firstname, :lastname, :with => /^[\w\s\'\-\.]*$/i
   validates_length_of :firstname, :lastname, :maximum => 30
   validates_format_of :mail, :with => /^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i, :allow_nil => true
--- a/redmine-1.1.1/db/migrate/001_setup.rb
+++ b/redmine-1.1.1/db/migrate/001_setup.rb
@@ -200,7 +200,7 @@ class Setup < ActiveRecord::Migration
     end
   
     create_table "users", :force => true do |t|
-      t.column "login", :string, :limit => 30, :default => "", :null => false
+      t.column "login", :string, :limit => 60, :default => "", :null => false
       t.column "hashed_password", :string, :limit => 40, :default => "", :null => false
       t.column "firstname", :string, :limit => 30, :default => "", :null => false
       t.column "lastname", :string, :limit => 30, :default => "", :null => false

journals

--------------------------------------------------------------------------------
Still a problem in Redmine 1.2.2

This is a fairly serious bug for those who want to use the --unknown-user=create option.
--------------------------------------------------------------------------------
+1
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
This problem should be fixed with r7952. Login is now truncated if needed.
--------------------------------------------------------------------------------


related_issues

relates,Closed,4969,issue creation by email fails when on-the-fly user creation fails
duplicates,Closed,5724,Email creation of new issues for anonymous users failing due to email address length
duplicates,Closed,8450,redmine:email:receive_imap fails silently when creating an account where login is too long

Admin Redmine さんがほぼ4年前に更新

  • カテゴリEmail receiving_29 にセット
  • 対象バージョン1.3.0_36 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0