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

http-auth succeeds but fails username and email #5549

Open
2 of 7 tasks
linkyone opened this issue Dec 15, 2018 · 2 comments
Open
2 of 7 tasks

http-auth succeeds but fails username and email #5549

linkyone opened this issue Dec 15, 2018 · 2 comments
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented

Comments

@linkyone
Copy link

  • Gitea version (or commit ref): 1.6.1
  • Git version: 2.20.0
  • Operating system: FreeBSD 11.2
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

In my deployment, I use an nginx reverse proxy with certificate based authentication. The CN on the cert contains spaces. This does not prevent the auto-register from functioning, however, when I try to correct the email address (as mentioned in #2347), I receive an error about spaces not permitted in the username (as mentioned in #1641).
I've tried modifying the nginx config to use $ssl_client_fingerprint for the http-auth header to remove the spaces, but then Gitea complains that the username is too long (> 35).

  • Nginx provides $ssl_client_escaped_cert which returns the client certificate in the PEM format (urlencoded) for an established SSL connection. Would it be possible to use this data to fill the email field?
  • Is it possible to add an exception to the "space in username" rule when using http-auth?
@zeripath
Copy link
Contributor

So I've added a PR #5554 which implements the proxy providing the email - this obviously doesn't solve your issue with making changes to users with spaces in the username.

Hmm, I wonder if we need to move to using the LoginName, LoginSource and LoginType fields and then have a generated username that can be trusted to be valid for us.

@stale
Copy link

stale bot commented Feb 14, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.

@stale stale bot added the issue/stale label Feb 14, 2019
@lunny lunny added issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented and removed issue/stale labels Feb 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented
Projects
None yet
Development

No branches or pull requests

3 participants