Gitlab调用CAS新用户登陆报422错误无法获取邮箱问题

gitlab8.x升级至11.14后,新用户登录提示422报错,确认为集团CAS做过调整,和通用CAS有区别,需修改cas认证

解决办法:

sed -i '/^      class AuthHash$/i\      require "uri"' /home/gitlab/gitlab/lib/gitlab/auth/o_auth/auth_hash.rb; \
sed -i 's/username_and_email\[:username\]\.to_s/URI.decode(username_and_email[:username].to_s)/' /home/gitlab/gitlab/lib/gitlab/auth/o_auth/auth_hash.rb; \
sed -i 's/username_and_email\[:email\]\.to_s/URI.decode(username_and_email[:email].to_s)/' /home/gitlab/gitlab/lib/gitlab/auth/o_auth/auth_hash.rb; \
sed -i 's/get_info(:name) || "#{get_info(:first_name)} #{get_info(:last_name)}"/URI.decode(get_info(:name) || "#{get_info(:first_name)} #{get_info(:last_name)}")/' /home/gitlab/gitlab/lib/gitlab/auth/o_auth/auth_hash.rb;
anzhihe 安志合个人博客,版权所有 丨 如未注明,均为原创 丨 转载请注明转自:https://chegva.com/3715.html | ☆★★每天进步一点点,加油!★★☆ | 

您可能还感兴趣的文章!

发表评论

电子邮件地址不会被公开。 必填项已用*标注