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

A TypeError occurred in account#login: #60

Open
archonwang opened this issue Apr 18, 2017 · 12 comments
Open

A TypeError occurred in account#login: #60

archonwang opened this issue Apr 18, 2017 · 12 comments

Comments

@archonwang
Copy link
Contributor

archonwang commented Apr 18, 2017

@FireMartsZ, Please check it . when I have installed the plugin and found I can not login.

Thanks.

in the branch https://github.com/FireMartZ/redmine-contracts-with-time-tracking-plugin
branch: master

A TypeError occurred in account#login:
 
  no implicit conversion of Symbol into Integer
  plugins/contracts/lib/contracts/hooks/hooks.rb:55:in `[]'
 
 
-------------------------------
Request:
-------------------------------
 
* URL : http://192.168.1.41/login
  * HTTP Method: POST
  * IP address : 192.168.50.251
* Parameters : {"utf8"=>"✓", "authenticity_token"=>"FF1AlrywERYrtdS4hUDXHThimQJOrcQJK6GI1FeVYYY/hz2i92Gtyg14ehjRst2x7cYugTOiZrWeJgrr7fQ7xg==", "back_url"=>"http://192.168.1.41/projects", "username"=>"bing.sun", "password"=>"[FILTERED]", "login"=>"Login»", "controller"=>"account", "action"=>"login"}
  * Timestamp  : 2017-04-18 06:02:10 UTC
  * Server : jira
  * Rails root : /opt/redmine-3.3
  * Process: 20068
 
-------------------------------
Session:
-------------------------------
 
  * session id: "cfa42424065ea4812ea1b05b2835a507"
  * data: {"session_id"=>"cfa42424065ea4812ea1b05b2835a507",
   "user_id"=>26,
   "tk"=>"eb4ee480c2b809c135eeb5d7ef7c2fee3a0a469f"}
 
-------------------------------
Environment:
-------------------------------
 
  * CONTENT_LENGTH                                 : 240
  * CONTENT_TYPE                                   : application/x-www-form-urlencoded
  * GATEWAY_INTERFACE                              : CGI/1.2
  * HTTP_ACCEPT                                    : text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
  * HTTP_ACCEPT_ENCODING                           : gzip, deflate
  * HTTP_ACCEPT_LANGUAGE                           : zh-CN,zh;q=0.8,en-US;q=0.5,en;q=0.3
  * HTTP_CONNECTION                                : keep-alive
  * HTTP_COOKIE                                    : _redmine_session=d1dYQTFocHJuZm5idSthaG8wZDJYVndsV0lMcXNsQ28vc2JuRWwzK2ZqUGN3NDdqaWpSeXRMcVIvZFhqdUVDMXJmakQ4Y3FnZUYwejRoenNlNTZha3U4SVJTSXd5MEw0SnZIUmc3Y0V1Yk1VQ0lZdTZoNkNyL2k1clVpdHhscTBKVWcrOTRucHVhQ2NFbFJ6dVhIR2pQbU9iZHUrd1NqL0FFS01lcnZXb1kwWkptVDhRU2JUdFpDVGl5TUNDRFRqSG9wNmZWR0xOZVdKc21PdWhvVTVLQT09LS0vOFNVTzB0bTdEQ01vOEF6VEJVb0h3PT0%3D--99b0716266b49e8c28f08957406cb56a72dc3957
  * HTTP_DNT                                       : 1
  * HTTP_HOST                                      : 192.168.1.41
* HTTP_REFERER : http://192.168.1.41/login
  * HTTP_UPGRADE_INSECURE_REQUESTS                 : 1
  * HTTP_USER_AGENT                                : Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0
  * HTTP_VERSION                                   : HTTP/1.1
  * ORIGINAL_FULLPATH                              : /login
  * ORIGINAL_SCRIPT_NAME                           :
  * PATH_INFO                                      : /login
  * QUERY_STRING                                   :
  * REMOTE_ADDR                                    : 192.168.50.251
  * REQUEST_METHOD                                 : POST
  * REQUEST_PATH                                   : /login
  * REQUEST_URI                                    : /login
  * ROUTES_25621260_SCRIPT_NAME                    :
  * SCRIPT_NAME                                    :
  * SERVER_NAME                                    : 192.168.1.41
  * SERVER_PORT                                    : 80
  * SERVER_PROTOCOL                                : HTTP/1.1
  * SERVER_SOFTWARE                                : thin 1.7.0 codename Dunder Mifflin
  * action_controller.instance                     : #<AccountController:0x007f822222e628>
  * action_dispatch.backtrace_cleaner              : #<Rails::BacktraceCleaner:0x00000005f7e978>
  * action_dispatch.cookies                        : #<ActionDispatch::Cookies::CookieJar:0x007f82220e2300>
  * action_dispatch.cookies_digest                 :
  * action_dispatch.cookies_serializer             :
  * action_dispatch.encrypted_cookie_salt          : encrypted cookie
  * action_dispatch.encrypted_signed_cookie_salt   : signed encrypted cookie
  * action_dispatch.http_auth_salt                 : http authentication
  * action_dispatch.key_generator                  : #<ActiveSupport::CachingKeyGenerator:0x000000035dc2a0>
  * action_dispatch.logger                         : #<ActiveSupport::Logger:0x00000003094fe0>
  * action_dispatch.parameter_filter               : [:password]
  * action_dispatch.redirect_filter                : []
  * action_dispatch.remote_ip                      : 192.168.50.251
  * action_dispatch.request.content_type           : application/x-www-form-urlencoded
  * action_dispatch.request.flash_hash             :
  * action_dispatch.request.formats                : [#<Mime::Type:0x00000004465d30 @synonyms=["application/xhtml+xml"], @symbol=:html, @string="text/html", @hash=-1387453635557031355>]
* action_dispatch.request.parameters : {"utf8"=>"✓", "authenticity_token"=>"FF1AlrywERYrtdS4hUDXHThimQJOrcQJK6GI1FeVYYY/hz2i92Gtyg14ehjRst2x7cYugTOiZrWeJgrr7fQ7xg==", "back_url"=>"http://192.168.1.41/projects", "username"=>"bing.sun", "password"=>"[FILTERED]", "login"=>"Login »", "controller"=>"account", "action"=>"login"}
  * action_dispatch.request.path_parameters        : {:controller=>"account", :action=>"login"}
  * action_dispatch.request.query_parameters       : {}
* action_dispatch.request.request_parameters : {"utf8"=>"✓", "authenticity_token"=>"FF1AlrywERYrtdS4hUDXHThimQJOrcQJK6GI1FeVYYY/hz2i92Gtyg14ehjRst2x7cYugTOiZrWeJgrr7fQ7xg==", "back_url"=>"http://192.168.1.41/projects", "username"=>"bing.sun", "password"=>"[FILTERED]", "login"=>"Login»"}
  * action_dispatch.request.unsigned_session_cookie: {"session_id"=>"cfa42424065ea4812ea1b05b2835a507"}
  * action_dispatch.request_id                     : 9570bc54-7b49-47bb-8952-204b844f0e3c
  * action_dispatch.routes                         : #<ActionDispatch::Routing::RouteSet:0x000000030de618>
  * action_dispatch.secret_key_base                : 59dda17a42803617f96151518b9aeecb94e132c6f140123f1982e1c8ae15d0103ffa854c4d8b0019
  * action_dispatch.secret_token                   :
  * action_dispatch.show_detailed_exceptions       : false
  * action_dispatch.show_exceptions                : true
  * action_dispatch.signed_cookie_salt             : signed cookie
  * async.callback                                 : #<Method: Thin::Connection#post_process>
  * async.close                                    : #<EventMachine::DefaultDeferrable:0x007f822225ac28>
  * rack.errors                                    : #<IO:0x00000001a095a0>
  * rack.input                                     : #<StringIO:0x007f822225bc68>
  * rack.multiprocess                              : false
  * rack.multithread                               : true
  * rack.request.cookie_hash                       : {"_redmine_session"=>"d1dYQTFocHJuZm5idSthaG8wZDJYVndsV0lMcXNsQ28vc2JuRWwzK2ZqUGN3NDdqaWpSeXRMcVIvZFhqdUVDMXJmakQ4Y3FnZUYwejRoenNlNTZha3U4SVJTSXd5MEw0SnZIUmc3Y0V1Yk1VQ0lZdTZoNkNyL2k1clVpdHhscTBKVWcrOTRucHVhQ2NFbFJ6dVhIR2pQbU9iZHUrd1NqL0FFS01lcnZXb1kwWkptVDhRU2JUdFpDVGl5TUNDRFRqSG9wNmZWR0xOZVdKc21PdWhvVTVLQT09LS0vOFNVTzB0bTdEQ01vOEF6VEJVb0h3PT0=--99b0716266b49e8c28f08957406cb56a72dc3957"}
  * rack.request.cookie_string                     : _redmine_session=d1dYQTFocHJuZm5idSthaG8wZDJYVndsV0lMcXNsQ28vc2JuRWwzK2ZqUGN3NDdqaWpSeXRMcVIvZFhqdUVDMXJmakQ4Y3FnZUYwejRoenNlNTZha3U4SVJTSXd5MEw0SnZIUmc3Y0V1Yk1VQ0lZdTZoNkNyL2k1clVpdHhscTBKVWcrOTRucHVhQ2NFbFJ6dVhIR2pQbU9iZHUrd1NqL0FFS01lcnZXb1kwWkptVDhRU2JUdFpDVGl5TUNDRFRqSG9wNmZWR0xOZVdKc21PdWhvVTVLQT09LS0vOFNVTzB0bTdEQ01vOEF6VEJVb0h3PT0%3D--99b0716266b49e8c28f08957406cb56a72dc3957
* rack.request.form_hash : {"utf8"=>"✓", "authenticity_token"=>"FF1AlrywERYrtdS4hUDXHThimQJOrcQJK6GI1FeVYYY/hz2i92Gtyg14ehjRst2x7cYugTOiZrWeJgrr7fQ7xg==", "back_url"=>"http://192.168.1.41/projects", "username"=>"bing.sun", "password"=>"[FILTERED]", "login"=>"Login»"}
  * rack.request.form_input                        : #<StringIO:0x007f822225bc68>
  * rack.request.form_vars                         : [FILTERED]
  * rack.request.query_hash                        : {}
  * rack.request.query_string                      :
  * rack.run_once                                  : false
  * rack.session                                   : #<ActionDispatch::Request::Session:0x007f822224eb30>
  * rack.session.options                           : #<ActionDispatch::Request::Session::Options:0x007f822224e978>
  * rack.url_scheme                                : http
  * rack.version                                   : [1, 0]
 
-------------------------------
Backtrace:
-------------------------------
 
  plugins/contracts/lib/contracts/hooks/hooks.rb:55:in `[]'
  plugins/contracts/lib/contracts/hooks/hooks.rb:55:in `controller_account_success_authentication_after'
  lib/redmine/hook.rb:61:in `block (2 levels) in call_hook'
  lib/redmine/hook.rb:61:in `each'
  lib/redmine/hook.rb:61:in `block in call_hook'
  lib/redmine/hook.rb:58:in `tap'
  lib/redmine/hook.rb:58:in `call_hook'
  lib/redmine/hook.rb:91:in `call_hook'
  app/controllers/account_controller.rb:272:in `successful_authentication'
  app/controllers/account_controller.rb:213:in `password_authentication'
  app/controllers/account_controller.rb:199:in `authenticate_user'
  app/controllers/account_controller.rb:40:in `login'
  lib/redmine/sudo_mode.rb:63:in `sudo_mode'
 
@FireMartZ
Copy link

Can you try with this change:
FireMartZ@22b6390

@archonwang
Copy link
Contributor Author

@FireMartZ , Thanks. I will test ASAP.

@archonwang
Copy link
Contributor Author

archonwang commented Apr 19, 2017

@FireMartZ , I checked the newest master branch, and found there's still have some issue when I try to login.

I used admin to login . and occur 500 error, the log is as follows

An IndexError occurred in account#login:
 
  string not matched
  plugins/contracts/lib/contracts/hooks/hooks.rb:84:in `[]='
 
 
-------------------------------
Request:
-------------------------------
 
* URL : http://192.168.1.41/login
  * HTTP Method: POST
  * IP address : 192.168.60.238
* Parameters : {"utf8"=>"✓", "authenticity_token"=>"nrire6o2TTbv7UfjR2+omVYuBSkkSruz7lCmkabJrdvVIVHJzTha8OJY1gt4C4sK8ev7lbN5bfXbP9uXGpzhuw==", "back_url"=>"http://192.168.1.41/", "username"=>"admin", "password"=>"[FILTERED]", "login"=>"login »", "controller"=>"account", "action"=>"login"}
  * Timestamp  : 2017-04-19 15:30:21 UTC
  * Server : jira
  * Rails root : /opt/redmine-3.3
  * Process: 22329
 
-------------------------------
Session:
-------------------------------
 
  * session id: "dd0d163799b95ee7a5e974c9401d7a3f"
  * data: {"session_id"=>"dd0d163799b95ee7a5e974c9401d7a3f",
   "user_id"=>1,
   "tk"=>"73a52cddd577e597451fdd2c2f012850626c69ab"}
 
-------------------------------
Environment:
-------------------------------
 
  * CONTENT_LENGTH                                 : 228
  * CONTENT_TYPE                                   : application/x-www-form-urlencoded
  * GATEWAY_INTERFACE                              : CGI/1.2
  * HTTP_ACCEPT                                    : text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
  * HTTP_ACCEPT_ENCODING                           : gzip, deflate
  * HTTP_ACCEPT_LANGUAGE                           : zh-CN,zh;q=0.8,en;q=0.6
  * HTTP_CACHE_CONTROL                             : max-age=0
  * HTTP_CONNECTION                                : keep-alive
  * HTTP_COOKIE                                    : _ga=GA1.1.383030868.1491968739; _redmine_session=cTRCZ0pqYzNTVHg4NlhadytDUGdoblBSaitZa29aVGVkZzgvQjZlK2N5SUVVWjdlbEllNjFaSExYN3NzUWFhK1FJOWY5OTlPZkM4VWt5TUM0YlNrYk5SZGlsMXpVckhDVThzeGZlcGtUbzMzUnUwbm9wYndiSmpDajlsWlZKeTh0TGVtMmpJN3BUc3BZR1BJWHFVYmM2T0xiaVNJQU50Q2paTjJWQnM2VExLSlhWNDgyM01XS3RtbVhyTThHTVMyLS1XN1ExZ0FjQ1BGemVvQlpvZ29vL2FnPT0%3D--489bf4fa7a42e1c9b4e840e15d9e2b3fe44527af
  * HTTP_HOST                                      : 192.168.1.41
* HTTP_ORIGIN : http://192.168.1.41
* HTTP_REFERER : http://192.168.1.41/login
  * HTTP_UPGRADE_INSECURE_REQUESTS                 : 1
  * HTTP_USER_AGENT                                : Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36
  * HTTP_VERSION                                   : HTTP/1.1
  * ORIGINAL_FULLPATH                              : /login
  * ORIGINAL_SCRIPT_NAME                           :
  * PATH_INFO                                      : /login
  * QUERY_STRING                                   :
  * REMOTE_ADDR                                    : 192.168.60.238
  * REQUEST_METHOD                                 : POST
  * REQUEST_PATH                                   : /login
  * REQUEST_URI                                    : /login
  * ROUTES_26412020_SCRIPT_NAME                    :
  * SCRIPT_NAME                                    :
  * SERVER_NAME                                    : 192.168.1.41
  * SERVER_PORT                                    : 80
  * SERVER_PROTOCOL                                : HTTP/1.1
  * SERVER_SOFTWARE                                : thin 1.7.0 codename Dunder Mifflin
  * action_controller.instance                     : #<AccountController:0x000000061b6ce0>
  * action_dispatch.backtrace_cleaner              : #<Rails::BacktraceCleaner:0x000000060f9c58>
  * action_dispatch.cookies                        : #<ActionDispatch::Cookies::CookieJar:0x0000000629be30>
  * action_dispatch.cookies_digest                 :
  * action_dispatch.cookies_serializer             :
  * action_dispatch.encrypted_cookie_salt          : encrypted cookie
  * action_dispatch.encrypted_signed_cookie_salt   : signed encrypted cookie
  * action_dispatch.http_auth_salt                 : http authentication
  * action_dispatch.key_generator                  : #<ActiveSupport::CachingKeyGenerator:0x00000005e20c48>
  * action_dispatch.logger                         : #<ActiveSupport::Logger:0x00000002a9ee10>
  * action_dispatch.parameter_filter               : [:password]
  * action_dispatch.redirect_filter                : []
  * action_dispatch.remote_ip                      : 192.168.60.238
  * action_dispatch.request.content_type           : application/x-www-form-urlencoded
  * action_dispatch.request.flash_hash             :
  * action_dispatch.request.formats                : [#<Mime::Type:0x00000005804418 @synonyms=["application/xhtml+xml"], @symbol=:html, @string="text/html", @hash=-2846184569053522448>]
* action_dispatch.request.parameters : {"utf8"=>"✓", "authenticity_token"=>"nrire6o2TTbv7UfjR2+omVYuBSkkSruz7lCmkabJrdvVIVHJzTha8OJY1gt4C4sK8ev7lbN5bfXbP9uXGpzhuw==", "back_url"=>"http://192.168.1.41/", "username"=>"admin", "password"=>"[FILTERED]", "login"=>"login »", "controller"=>"account", "action"=>"login"}
  * action_dispatch.request.path_parameters        : {:controller=>"account", :action=>"login"}
  * action_dispatch.request.query_parameters       : {}
* action_dispatch.request.request_parameters : {"utf8"=>"✓", "authenticity_token"=>"nrire6o2TTbv7UfjR2+omVYuBSkkSruz7lCmkabJrdvVIVHJzTha8OJY1gt4C4sK8ev7lbN5bfXbP9uXGpzhuw==", "back_url"=>"http://192.168.1.41/", "username"=>"admin", "password"=>"[FILTERED]", "login"=>"登录 »"}
  * action_dispatch.request.unsigned_session_cookie: {"session_id"=>"dd0d163799b95ee7a5e974c9401d7a3f"}
  * action_dispatch.request_id                     : 5f8cf303-38f0-4579-85f3-7e9327e117cc
  * action_dispatch.routes                         : #<ActionDispatch::Routing::RouteSet:0x000000032607e8>
  * action_dispatch.secret_key_base                : 59dda17a42803617f96151518b9aeecb94e132c6f140123f1982e1c8ae15d0103ffa854c4d8b0019
  * action_dispatch.secret_token                   :
  * action_dispatch.show_detailed_exceptions       : false
  * action_dispatch.show_exceptions                : true
  * action_dispatch.signed_cookie_salt             : signed cookie
  * async.callback                                 : #<Method: Thin::Connection#post_process>
  * async.close                                    : #<EventMachine::DefaultDeferrable:0x00000005f757b0>
  * rack.errors                                    : #<IO:0x00000001b995a0>
  * rack.input                                     : #<StringIO:0x00000005f81830>
  * rack.multiprocess                              : false
  * rack.multithread                               : true
  * rack.request.cookie_hash                       : {"_ga"=>"GA1.1.383030868.1491968739", "_redmine_session"=>"cTRCZ0pqYzNTVHg4NlhadytDUGdoblBSaitZa29aVGVkZzgvQjZlK2N5SUVVWjdlbEllNjFaSExYN3NzUWFhK1FJOWY5OTlPZkM4VWt5TUM0YlNrYk5SZGlsMXpVckhDVThzeGZlcGtUbzMzUnUwbm9wYndiSmpDajlsWlZKeTh0TGVtMmpJN3BUc3BZR1BJWHFVYmM2T0xiaVNJQU50Q2paTjJWQnM2VExLSlhWNDgyM01XS3RtbVhyTThHTVMyLS1XN1ExZ0FjQ1BGemVvQlpvZ29vL2FnPT0=--489bf4fa7a42e1c9b4e840e15d9e2b3fe44527af"}
  * rack.request.cookie_string                     : _ga=GA1.1.383030868.1491968739; _redmine_session=cTRCZ0pqYzNTVHg4NlhadytDUGdoblBSaitZa29aVGVkZzgvQjZlK2N5SUVVWjdlbEllNjFaSExYN3NzUWFhK1FJOWY5OTlPZkM4VWt5TUM0YlNrYk5SZGlsMXpVckhDVThzeGZlcGtUbzMzUnUwbm9wYndiSmpDajlsWlZKeTh0TGVtMmpJN3BUc3BZR1BJWHFVYmM2T0xiaVNJQU50Q2paTjJWQnM2VExLSlhWNDgyM01XS3RtbVhyTThHTVMyLS1XN1ExZ0FjQ1BGemVvQlpvZ29vL2FnPT0%3D--489bf4fa7a42e1c9b4e840e15d9e2b3fe44527af
* rack.request.form_hash : {"utf8"=>"✓", "authenticity_token"=>"nrire6o2TTbv7UfjR2+omVYuBSkkSruz7lCmkabJrdvVIVHJzTha8OJY1gt4C4sK8ev7lbN5bfXbP9uXGpzhuw==", "back_url"=>"http://192.168.1.41/", "username"=>"admin", "password"=>"[FILTERED]", "login"=>"login »"}
  * rack.request.form_input                        : #<StringIO:0x00000005f81830>
  * rack.request.form_vars                         : [FILTERED]
  * rack.request.query_hash                        : {}
  * rack.request.query_string                      :
  * rack.run_once                                  : false
  * rack.session                                   : #<ActionDispatch::Request::Session:0x000000061da0a0>
  * rack.session.options                           : #<ActionDispatch::Request::Session::Options:0x000000061d9f88>
  * rack.url_scheme                                : http
  * rack.version                                   : [1, 0]
 
-------------------------------
Backtrace:
-------------------------------
 
  plugins/contracts/lib/contracts/hooks/hooks.rb:84:in `[]='
  plugins/contracts/lib/contracts/hooks/hooks.rb:84:in `controller_account_success_authentication_after'
  lib/redmine/hook.rb:61:in `block (2 levels) in call_hook'
  lib/redmine/hook.rb:61:in `each'
  lib/redmine/hook.rb:61:in `block in call_hook'
  lib/redmine/hook.rb:58:in `tap'
  lib/redmine/hook.rb:58:in `call_hook'
  lib/redmine/hook.rb:91:in `call_hook'
  app/controllers/account_controller.rb:272:in `successful_authentication'
  app/controllers/account_controller.rb:213:in `password_authentication'
  app/controllers/account_controller.rb:199:in `authenticate_user'
  app/controllers/account_controller.rb:40:in `login'
  lib/redmine/sudo_mode.rb:63:in `sudo_mode'

@FireMartZ
Copy link

FireMartZ commented Apr 19, 2017

Thanks for taking time to test it as I can't reproduce anything close to this problem. I will do as other suggested and remove those two lines. The effect is only that the "Poor Man's Cron" will run each login instead of each day.

What may be the real problem is that if you can't access Setting.plugin_contracts there (which is a little bit misused to implement the Poor Man's Cron, you will probably have problems changing the real settings on the plugin.

@archonwang
Copy link
Contributor Author

archonwang commented Apr 19, 2017

@FireMartZ , you're welcome.
in Line84 it seems not match the string type.

I tried to check whether I have found the correct way to explain the issue in stackflow. please check it. Thanks.

related pages:
http://stackoverflow.com/questions/2072283/rails-strange-error-indexerror-string-not-matched

by the way ,I can not check issue#58 on the redmine website for this issue.
#58 (comment)

@FireMartZ
Copy link

The error you have is because Setting.plugin_contracts is a string instead of being a hash. We have to figure why. I may have an idea and will update the code again later today so you can test it please.

@archonwang
Copy link
Contributor Author

@FireMartZ ,
I got it.
If you have finished it, please let me know. Thanks so much.

@FireMartZ
Copy link

@archonwang
You may try the latest master when you have the chance:
https://github.com/FireMartZ/redmine-contracts-with-time-tracking-plugin

@archonwang
Copy link
Contributor Author

@FireMartZ , unfortunately, the workaround still not worked well.
please check it. Thanks.

An ArgumentError occurred in account#login:
 
  odd number of arguments for Hash
  plugins/contracts/lib/contracts/hooks/hooks.rb:60:in `controller_account_success_authentication_after'
 
 
-------------------------------
Request:
-------------------------------
 
* URL : http://192.168.1.41/login
  * HTTP Method: POST
  * IP address : 192.168.20.231
* Parameters : {"utf8"=>"✓", "authenticity_token"=>"dsqgR3SySDvE/PVc73xxcnsljGvW2Vk/yBe4OvnBPi2B1ebUIDjjJiAsIIM+sOmmhamiXp/v+hDCf+KRdYLS7g==", "back_url"=>"http://192.168.1.41/", "username"=>"hui.wang", "password"=>"[FILTERED]", "login"=>"登录 »", "controller"=>"account", "action"=>"login"}
  * Timestamp  : 2017-04-20 02:18:26 UTC
  * Server : jira
  * Rails root : /opt/redmine-3.3
  * Process: 4305
 
-------------------------------
Session:
-------------------------------
 
  * session id: "7fb33f7cd2442b8c9edb6ec8508a61e5"
  * data: {"session_id"=>"7fb33f7cd2442b8c9edb6ec8508a61e5",
   "user_id"=>8,
   "tk"=>"cc30cd62cccbab441040441572d9b0565ea29e9c"}
 
-------------------------------
Environment:
-------------------------------
 
  * CONTENT_LENGTH                                 : 242
  * CONTENT_TYPE                                   : application/x-www-form-urlencoded
  * GATEWAY_INTERFACE                              : CGI/1.2
  * HTTP_ACCEPT                                    : text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
  * HTTP_ACCEPT_ENCODING                           : gzip, deflate
  * HTTP_ACCEPT_LANGUAGE                           : zh-CN,zh;q=0.8,en;q=0.6
  * HTTP_CACHE_CONTROL                             : max-age=0
  * HTTP_CONNECTION                                : keep-alive
  * HTTP_COOKIE                                    : _redmine_session=OGhPVnEyT0kzSllGVnd4YTNzRkZsa2pCU3c5UGo4QVR5MFpqait5Tm1CMFM3bFVLd0svZU1sTW9DVlFacEFseWZWczlZNE03Y3huKzRxWFhkaHBTVG5FRllOSXVONHc5THJJQkNURkpmNWVTVktVbzZjZmJKN0RndVJTbEJrbnIzSll2bEE0d2JtMit6bytNaDBjQWh1VEVoSHRDTldwMitqZGpzQTVEbHpacDAvemxwWS9aOTRDRnUzLy9nMFFkLS00K1liWUdqRGlMNmxBdlZPbUM3ZlRBPT0%3D--1a4448af3e83dc778e00d8312cc0505cbabfbe33
  * HTTP_HOST                                      : 192.168.1.41
* HTTP_ORIGIN : http://192.168.1.41
* HTTP_REFERER : http://192.168.1.41/login
  * HTTP_UPGRADE_INSECURE_REQUESTS                 : 1
  * HTTP_USER_AGENT                                : Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36
  * HTTP_VERSION                                   : HTTP/1.1
  * ORIGINAL_FULLPATH                              : /login
  * ORIGINAL_SCRIPT_NAME                           :
  * PATH_INFO                                      : /login
  * QUERY_STRING                                   :
  * REMOTE_ADDR                                    : 192.168.20.231
  * REQUEST_METHOD                                 : POST
  * REQUEST_PATH                                   : /login
  * REQUEST_URI                                    : /login
  * ROUTES_15483840_SCRIPT_NAME                    :
  * SCRIPT_NAME                                    :
  * SERVER_NAME                                    : 192.168.1.41
  * SERVER_PORT                                    : 80
  * SERVER_PROTOCOL                                : HTTP/1.1
  * SERVER_SOFTWARE                                : thin 1.7.0 codename Dunder Mifflin
  * action_controller.instance                     : #<AccountController:0x0000000979b798>
  * action_dispatch.backtrace_cleaner              : #<Rails::BacktraceCleaner:0x00000005314e08>
  * action_dispatch.cookies                        : #<ActionDispatch::Cookies::CookieJar:0x000000097987a0>
  * action_dispatch.cookies_digest                 :
  * action_dispatch.cookies_serializer             :
  * action_dispatch.encrypted_cookie_salt          : encrypted cookie
  * action_dispatch.encrypted_signed_cookie_salt   : signed encrypted cookie
  * action_dispatch.http_auth_salt                 : http authentication
  * action_dispatch.key_generator                  : #<ActiveSupport::CachingKeyGenerator:0x00000004e69d68>
  * action_dispatch.logger                         : #<ActiveSupport::Logger:0x00000001cecfb0>
  * action_dispatch.parameter_filter               : [:password]
  * action_dispatch.redirect_filter                : []
  * action_dispatch.remote_ip                      : 192.168.20.231
  * action_dispatch.request.content_type           : application/x-www-form-urlencoded
  * action_dispatch.request.flash_hash             :
  * action_dispatch.request.formats                : [#<Mime::Type:0x00000004a49260 @synonyms=["application/xhtml+xml"], @symbol=:html, @string="text/html", @hash=90224538459421418>]
* action_dispatch.request.parameters : {"utf8"=>"✓", "authenticity_token"=>"dsqgR3SySDvE/PVc73xxcnsljGvW2Vk/yBe4OvnBPi2B1ebUIDjjJiAsIIM+sOmmhamiXp/v+hDCf+KRdYLS7g==", "back_url"=>"http://192.168.1.41/", "username"=>"hui.wang", "password"=>"[FILTERED]", "login"=>"login»", "controller"=>"account", "action"=>"login"}
  * action_dispatch.request.path_parameters        : {:controller=>"account", :action=>"login"}
  * action_dispatch.request.query_parameters       : {}
* action_dispatch.request.request_parameters : {"utf8"=>"✓", "authenticity_token"=>"dsqgR3SySDvE/PVc73xxcnsljGvW2Vk/yBe4OvnBPi2B1ebUIDjjJiAsIIM+sOmmhamiXp/v+hDCf+KRdYLS7g==", "back_url"=>"http://192.168.1.41/", "username"=>"hui.wang", "password"=>"[FILTERED]", "login"=>"login»"}
  * action_dispatch.request.unsigned_session_cookie: {"session_id"=>"7fb33f7cd2442b8c9edb6ec8508a61e5"}
  * action_dispatch.request_id                     : 3572c5cf-17e9-4473-9d92-8f82ae14fb9e
  * action_dispatch.routes                         : #<ActionDispatch::Routing::RouteSet:0x00000001d88780>
  * action_dispatch.secret_key_base                : 59dda17a42803617f96151518b9aeecb94e132c6f140123f1982e1c8ae15d0103ffa854c4d8b0019
  * action_dispatch.secret_token                   :
  * action_dispatch.show_detailed_exceptions       : false
  * action_dispatch.show_exceptions                : true
  * action_dispatch.signed_cookie_salt             : signed cookie
  * async.callback                                 : #<Method: Thin::Connection#post_process>
  * async.close                                    : #<EventMachine::DefaultDeferrable:0x00000009701170>
  * rack.errors                                    : #<IO:0x00000000dd1580>
  * rack.input                                     : #<StringIO:0x00000009701f08>
  * rack.multiprocess                              : false
  * rack.multithread                               : true
  * rack.request.cookie_hash                       : {"_redmine_session"=>"OGhPVnEyT0kzSllGVnd4YTNzRkZsa2pCU3c5UGo4QVR5MFpqait5Tm1CMFM3bFVLd0svZU1sTW9DVlFacEFseWZWczlZNE03Y3huKzRxWFhkaHBTVG5FRllOSXVONHc5THJJQkNURkpmNWVTVktVbzZjZmJKN0RndVJTbEJrbnIzSll2bEE0d2JtMit6bytNaDBjQWh1VEVoSHRDTldwMitqZGpzQTVEbHpacDAvemxwWS9aOTRDRnUzLy9nMFFkLS00K1liWUdqRGlMNmxBdlZPbUM3ZlRBPT0=--1a4448af3e83dc778e00d8312cc0505cbabfbe33"}
  * rack.request.cookie_string                     : _redmine_session=OGhPVnEyT0kzSllGVnd4YTNzRkZsa2pCU3c5UGo4QVR5MFpqait5Tm1CMFM3bFVLd0svZU1sTW9DVlFacEFseWZWczlZNE03Y3huKzRxWFhkaHBTVG5FRllOSXVONHc5THJJQkNURkpmNWVTVktVbzZjZmJKN0RndVJTbEJrbnIzSll2bEE0d2JtMit6bytNaDBjQWh1VEVoSHRDTldwMitqZGpzQTVEbHpacDAvemxwWS9aOTRDRnUzLy9nMFFkLS00K1liWUdqRGlMNmxBdlZPbUM3ZlRBPT0%3D--1a4448af3e83dc778e00d8312cc0505cbabfbe33
* rack.request.form_hash : {"utf8"=>"✓", "authenticity_token"=>"dsqgR3SySDvE/PVc73xxcnsljGvW2Vk/yBe4OvnBPi2B1ebUIDjjJiAsIIM+sOmmhamiXp/v+hDCf+KRdYLS7g==", "back_url"=>"http://192.168.1.41/", "username"=>"hui.wang", "password"=>"[FILTERED]", "login"=>"login»"}
  * rack.request.form_input                        : #<StringIO:0x00000009701f08>
  * rack.request.form_vars                         : [FILTERED]
  * rack.request.query_hash                        : {}
  * rack.request.query_string                      :
  * rack.run_once                                  : false
  * rack.session                                   : #<ActionDispatch::Request::Session:0x000000097655f8>
  * rack.session.options                           : #<ActionDispatch::Request::Session::Options:0x000000097655a8>
  * rack.url_scheme                                : http
  * rack.version                                   : [1, 0]
 
-------------------------------
Backtrace:
-------------------------------
 
  plugins/contracts/lib/contracts/hooks/hooks.rb:60:in `controller_account_success_authentication_after'
  lib/redmine/hook.rb:61:in `block (2 levels) in call_hook'
  lib/redmine/hook.rb:61:in `each'
  lib/redmine/hook.rb:61:in `block in call_hook'
  lib/redmine/hook.rb:58:in `tap'
  lib/redmine/hook.rb:58:in `call_hook'
  lib/redmine/hook.rb:91:in `call_hook'
  app/controllers/account_controller.rb:272:in `successful_authentication'
  app/controllers/account_controller.rb:213:in `password_authentication'
  app/controllers/account_controller.rb:199:in `authenticate_user'
  app/controllers/account_controller.rb:40:in `login'
  lib/redmine/sudo_mode.rb:63:in `sudo_mode'

@FireMartZ
Copy link

FireMartZ commented Apr 20, 2017

@archonwang My bad, it should work now. Please try it again when you get the chance. Thanks!

@archonwang
Copy link
Contributor Author

@FireMartZ ,
WOW~~ Great job!
I checked #58 and #61 , it's working well now.

Thanks so much!!

@dmp1ce
Copy link
Member

dmp1ce commented Apr 21, 2017

Please keep these issues open until they are merged. I'll try to get @wesoccer2003 back online soon.

@dmp1ce dmp1ce reopened this Apr 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants