Open EnziinSystem opened 6 years ago
Thanks. That saved my day!
I just came across one issue in the parse_email function: a crash will result from improper access to the returned array.
It seems that entries in a map like this x={:login=>"a", :domain=>"b"}
can only be accessed via x[:domain]
and not like this x["domain"]
the later is the form that the code is using to refer to the map entries.
my fix was to change how the index is set in the returned map in lib/helpers/mail_helper.rb
to
{"login" => email_data[1], "domain" => email_data[2]} if email_data
My system specs :
Redmine version 3.4.5.stable
Ruby version 2.4.3-p205 (2017-12-14) [x86_64-linux]
Rails version 4.2.8
Otherwise all worked well as expected. Thank you again! Regards,
Thanks kefahi fix worked for me. Without this fix, any entries in "Available domains" isn't working at all.
My Specs Environment: Redmine version 3.4.6.stable Ruby version 2.4.4-p296 (2018-03-28) [x86_64-linux] Rails version 4.2.8 Environment production Database adapter Mysql2
Hi all, My app error after redirect google. log in file is:
Started GET "/oauth2callback?code=4/WQCYaB41ZGi_zU3TqPwlol8N-CHhFfhqHiveQIr6ZZkWBe_gHAVYb0XGJ6HJ1JiNLPgfVy4nmM7Q6Jhm2ClgCBI&scope=https://www.googleapis.com/auth/userinfo.email+https://www.googleapis.com/auth/userinfo.profile" for ::1 at 2018-09-13 19:52:14 +0700 Processing by RedmineOauthController#oauth_google_callback as HTML Parameters: {"code"=>"4/WQCYaB41ZGi_zU3TqPwlol8N-CHhFfhqHiveQIr6ZZkWBe_gHAVYb0XGJ6HJ1JiNLPgfVy4nmM7Q6Jhm2ClgCBI", "scope"=>"https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile"} Current user: anonymous Completed 500 Internal Server Error in 81ms (ActiveRecord: 3.0ms)
Faraday::SSLError (SSL_connect returned=1 errno=0 state=error: certificate verify failed):
plugins/redmine_omniauth_google/app/controllers/redmine_oauth_controller.rb:21:in oauth_google_callback' lib/redmine/sudo_mode.rb:63:in
sudo_mode'
please help me, Thanks.
This is the source final, it's work. Redmine 3.4 Ruby 2.4
redmine_omniauth_google.zip