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

Fixed for Redmine 3.4 and Ruby 2.4 #43

Open
EnziinSystem opened this issue Mar 27, 2018 · 3 comments
Open

Fixed for Redmine 3.4 and Ruby 2.4 #43

EnziinSystem opened this issue Mar 27, 2018 · 3 comments

Comments

@EnziinSystem
Copy link

This is the source final, it's work.
Redmine 3.4
Ruby 2.4

redmine_omniauth_google.zip

@EnziinSystem EnziinSystem changed the title Fix for Redmine 3.4 and Ruby 2.4 Fixed for Redmine 3.4 and Ruby 2.4 Mar 27, 2018
@kefahi
Copy link

kefahi commented May 1, 2018

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,

@kdevineni
Copy link

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

@nam23690
Copy link

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.

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

4 participants