
14

Gitlab调用CAS新用户登陆报422错误无法获取邮箱问题
source link: https://chegva.com/3715.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Gitlab调用CAS新用户登陆报422错误无法获取邮箱问题
gitlab从8.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;


您可能还感兴趣的文章!
发表评论 取消回复
电子邮件地址不会被公开。 必填项已用*标注
评论
姓名 *
电子邮件 *
站点
Save my name, email, and website in this browser for the next time I comment.
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK