11

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

 2 years ago
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;
anzhihe安志合个人博客,版权所有丨 如未注明,均为原创 丨转载请注明转自:https://chegva.com/3715.html | ☆★★每天进步一点点,加油!★★☆
bq.png 标签: Gitlab

book.png 您可能还感兴趣的文章!

发表评论 取消回复

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

评论

姓名 *

电子邮件 *

站点

Save my name, email, and website in this browser for the next time I comment.

© 2016-2021 安志合 版权所有 | 订阅 | 站点统计 | 京 ICP17028760 | 由WordPress自豪地提供. Theme: Flat by Themeisle.

Recommend

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK