upload fails because email address doesn't match (case)

360 views
Skip to first unread message

dpreilan

unread,
Nov 16, 2011, 11:18:51 AM11/16/11
to Repo and Gerrit Discussion
I think this is reported as issue #17446.

Users .gitconfig or data entered at repo init time doesn't match the
account information in gerrit. I am not sure username matters, but
email address doesn't match exactly because of case. For example,
gerrit has me as mefirst...@me.com, and commit has
Mefirst@Melast@me.com.

I don't have the forge commit identity permission so the upload fails.
I am on gerrit 2.2.1.

This seems like it could be a simple change for gerrit to ignore case.
Any chance it getting changed for 2.2.2? Also, when is 2.2.2 going to
be released?

Thanks

Nicholas Mucci

unread,
Nov 16, 2011, 3:59:13 PM11/16/11
to Repo and Gerrit Discussion
Gerrit is enforcing RFC2821. I don't think Exchange based email
systems adhere to this RFC. For example, at my company,
"Nick....@foobar.com" == "nick....@foobar.com", even though
RFC2821 says this is wrong. We have to set up secondary emails for
everyone in Gerrit because they set their committer emails to
"firstname.lastname" when Exchange has them listed as
"Firstname.Lastname" and Gerrit pulls "Firstname.Lastname" from Active
Directory.

-Nick

On Nov 16, 10:18 am, dpreilan <dreil...@gmail.com> wrote:
> I think this is reported as issue #17446.
>
> Users .gitconfig or data entered at repo init time doesn't match the
> account information in gerrit. I am not sure username matters, but
> email address doesn't match exactly because of case. For example,
> gerrit has me as mefirst.mel...@me.com, and commit has
> Mefirst@Mel...@me.com.

Martin Fick

unread,
Nov 16, 2011, 4:05:35 PM11/16/11
to repo-d...@googlegroups.com, dpreilan
On Wednesday, November 16, 2011 09:18:51 am dpreilan wrote:
> I think this is reported as issue #17446.
>
> Users .gitconfig or data entered at repo init time
> doesn't match the account information in gerrit. I am
> not sure username matters, but email address doesn't
> match exactly because of case. For example, gerrit has
> me as mefirst...@me.com, and commit has
> Mefirst@Melast@me.com.

The username part of an email is case sensitive, so it would
be bad for Gerrit to enforce that. However, ideally you
would be able to enforce that yourself via an upload_change
hook. Shawn cleared the way to create such hooks for Gerrit
at this year's gittogether, so a patch to do this (add an
upload deny ability) will gladly be accepted.


> This seems like it could be a simple change for gerrit to
> ignore case. Any chance it getting changed for 2.2.2?
> Also, when is 2.2.2 going to be released?


This would not likely to make it for 2.2.2 which will
effectively be a stable release, but no reason it couldn't
make it to 2.2.3,

-Martin

--
Employee of Qualcomm Innovation Center, Inc. which is a
member of Code Aurora Forum

dpreilan

unread,
Nov 16, 2011, 4:31:20 PM11/16/11
to Repo and Gerrit Discussion
What would/could the upload change hook do? modify the commit?
Note, I already need a post-upload hook to trigger builds. I am
guessing nobody is interested in that patch.

In my case, all the ldap email entries are lower case, but have folks
with different cases in .gitconfig or just typing in different cases
at repo init time.
I was toying with the adding 'option' to repo init to take resulting
email (however) it got it, and convert to lower case and writing out.
There is no way to query gerrit (as normal user) as to what email
address for my account/key is, correct?

Doug



On Nov 16, 4:05 pm, Martin Fick <mf...@codeaurora.org> wrote:
> On Wednesday, November 16, 2011 09:18:51 am dpreilan wrote:
>
> > I think this is reported as issue #17446.
>
> > Users .gitconfig or data entered at repo init time
> > doesn't match the account information in gerrit. I am
> > not sure username matters, but email address doesn't
> > match exactly because of case. For example, gerrit has
> > me as mefirst.mel...@me.com, and commit has
> > Mefirst@Mel...@me.com.
>

dpreilan

unread,
Nov 21, 2011, 10:21:59 AM11/21/11
to Repo and Gerrit Discussion
Martin, Can you explain what a 'upload change hook' would/could do?

Martin Fick

unread,
Nov 22, 2011, 6:03:55 PM11/22/11
to repo-d...@googlegroups.com, dpreilan
On Monday, November 21, 2011 08:21:59 am dpreilan wrote:
> Martin, Can you explain what a 'upload change hook'
> would/could do?

Uh, no, because I was obviously confused. :)

I was thinking that you could use the hook to reject changes
with emails that you didn't like (we do that), but since you
want the opposite, I don't think a hook would work, sorry.

-Martin

> On Nov 16, 4:31 pm, dpreilan <dreil...@gmail.com> wrote:
> > What would/could the upload change hook do? modify the
> > commit? Note, I already need a post-upload hook to
> > trigger builds. I am guessing nobody is interested in
> > that patch.
> >
> > In my case, all the ldap email entries are lower case,
> > but have folks with different cases in .gitconfig or
> > just typing in different cases at repo init time.
> > I was toying with the adding 'option' to repo init to
> > take resulting email (however) it got it, and convert
> > to lower case and writing out. There is no way to
> > query gerrit (as normal user) as to what email address
> > for my account/key is, correct?
> >
> > Doug

--

dpreilan

unread,
Nov 23, 2011, 1:48:35 PM11/23/11
to Repo and Gerrit Discussion
ok, there isn't anyway for normal user to query their 'on-file' email
address from gerrit, correct?

Shawn Pearce

unread,
Nov 23, 2011, 2:47:02 PM11/23/11
to dpreilan, Repo and Gerrit Discussion
On Wed, Nov 23, 2011 at 10:48, dpreilan <drei...@gmail.com> wrote:
> ok, there isn't anyway for normal user to query their 'on-file' email
> address from gerrit, correct?

They can look at the Settings page under Contact Information, or
Identities. Any of those email addresses listed is accepted by Gerrit.
Under Contact Information users can add other email addresses by
having Gerrit send them an email with an activation link that verifies
the email reaches the user.

Emmanuel Grumbach

unread,
Nov 24, 2011, 7:20:28 AM11/24/11
to Shawn Pearce, dpreilan, Repo and Gerrit Discussion

Note that this issue has been discussed here [1] too.

[1] http://code.google.com/p/gerrit/issues/detail?id=900

Martin did I read you correctly when you say the the username part of
the email address is case sensitive ?
It seems odd to me. I can send emails to myself even if I changed the
case of my username in the address...
Or maybe the exchange server I use at work corrects the case ?

Shawn Pearce

unread,
Nov 26, 2011, 7:31:23 PM11/26/11
to Emmanuel Grumbach, dpreilan, Repo and Gerrit Discussion
On Thu, Nov 24, 2011 at 04:20, Emmanuel Grumbach <egru...@gmail.com> wrote:
> Martin did I read you correctly when you say the the username part of
> the email address is case sensitive ?

Yes, the username is case sensitive.

> It seems odd to me. I can send emails to myself even if I changed the
> case of my username in the address...
> Or maybe the exchange server I use at work corrects the case ?

Some servers accept the username with any case, yes. The RFCs just
state that a program sending mail (like Gerrit) must assume
X...@example.com and x...@example.com are different addresses, just like
X+...@example.com and X...@example.com are different addresses. The fact
that some mail servers may route everything to X's inbox is a policy
decision of @example.com's mail configuration and is not something
that a mail sender may assume.

Reply all
Reply to author
Forward
0 new messages