ITADN

Unable to log in with GitHub

#1787OpenYoshiRulz 创建于 2026-06-06
bug
Y
YoshiRulzcommented
**Describe the bug** If I try to use the "Sign in with GitHub" feature on hydra.nixos.org, after returning from the auth flow Hydra shows the error `Caught exception in Hydra::Controller::User->github_login "Illegal email address."`. **To Reproduce** Steps to reproduce the behavior: 1. (I assume) Change primary email on GitHub to `username+GitHub@site.example` 1. `Sign in` > `Sign in with GitHub` 1. On GitHub, confirm third-party auth, get redirected back to Hydra 1. 500 Internal Server Error **Expected behavior** Successful authentication. Whatever you're using the email address for, instead use the username or whatever UUID GitHub exposes. Don't parse/validate email addresses unless you're sending emails. **Hydra Server:** `Hydra 0.1.20260316.a40d428 (using nix-2.34.8 and nix-eval-jobs-2.34.1).` **Additional context** https://github.com/NixOS/hydra/blob/395c32aff1a0091a52cf63ff5a341ae14f41f0d8/subprojects/hydra/lib/Hydra/Controller/User.pm#L99-L101 This RegEx gives false positives as well as false negatives: `..@..` is invalid but will be accepted.
0 条评论