Automatic Username Generation on Reporting a Bug #113222

Closed
opened 2023-10-03 23:55:46 +02:00 by Kaszanas · 7 comments

System Information
Browser: Chrome

Short description of error

When creating an account, using a full name, for example "Andrzej Białecki", the username is created automatically, and when attempting to finish the registration and send email confirmation the typical regex form validation does not allow users to register.

Exact steps for others to reproduce the error
Create any account where full name is containing "ł" character.

**System Information** Browser: Chrome **Short description of error** When creating an account, using a full name, for example "Andrzej Białecki", the username is created automatically, and when attempting to finish the registration and send email confirmation the typical regex form validation does not allow users to register. **Exact steps for others to reproduce the error** Create any account where full name is containing "ł" character.
Kaszanas added the
Type
Report
Priority
Normal
Status
Needs Triage
labels 2023-10-03 23:55:46 +02:00
Contributor

Hi @Kaszanas, thank you for your report. It was mentioned in the blender-coders chatroom. This is likely a combination of a few issues, with Gitea and Chrome, but not with the integration with BlenderID. So as a note to the triagers, I'm not sure if this issue should remain open here, or be moved to the infrastructure project to track?

You mention the email regex, so I'll talk about that first, which when a field is set to type=email chrome blocks characters such as ł and similar ones (even though the many email RFCs allow them, so something like ł@example.com is a valid address regardless of what many email validation tools will say). As you can see from the following screenshot, I've been able to replicate it being blocked:

a screenshot of chrome not allowing certain characters in email addreses

Note, I only tested this in Chrome, and can't say what other browsers might accept/deny, although even if it weren't the case with Chrome, I believe Gitea may have a similar limited regex for emails.

Could you say if your email has ł in it? This isn't the root of what you are facing, but I'd be interested in knowing, as it could be another issue in the future.

Finally, what you are facing is that there is a conflict between the usernames that BlenderID allows and the one that Gitea allows. What should happen is that Gitea should "gitealize" (for lack of a better word) the usernames it accepts from not just BlenderID, but all external OAuth2 systems, and when it doesn't, what you are running into happens.

This conflict between usernames in both systems was discovered by BF previously, and the tool to synchronize BlenderID and Gitea users has the "gitealizer" in place.
https://projects.blender.org/infrastructure/gitea-blenderid-webhook/src/branch/main/gitea_blenderid_webhook/gitea_users.py#L256

The next steps that should be taken are in Gitea upstream, the username modifier should be applied, so that even if an external system sends information in something it doesn't accept that a modifier should be used. Or, in the short term it could likely be applied to the "goth" blender_id go module.

In-depth technical note/background information around why Gitea behaves in this way: For each user, a folder on disk is created to store repos, and due to some filesystems being incredibly restrictive with the folder names then since the goal of Gitea is to run "everywhere" it has to adopt the same restrictions.

I'm linking this thread in a related chatroom rather than pinging specific BF folk directly as I'm not entirely sure of the etiquette in this repo, and don't want ping if that's not appropriate for this repo.

Hi @Kaszanas, thank you for your report. It was mentioned in the blender-coders chatroom. This is likely a combination of a few issues, with Gitea and Chrome, but not with the integration with BlenderID. So as a note to the triagers, I'm not sure if this issue should remain open here, or be moved to the infrastructure project to track? You mention the email regex, so I'll talk about that first, which when a field is set to `type=email` chrome blocks characters such as `ł` and similar ones (even though the many email RFCs allow them, so something like `ł@example.com` is a valid address regardless of what many email validation tools will say). As you can see from the following screenshot, I've been able to replicate it being blocked: ![a screenshot of chrome not allowing certain characters in email addreses](/attachments/6ec62d8c-8831-47ba-8d1d-a071aa531088) Note, I only tested this in Chrome, and can't say what other browsers might accept/deny, although even if it weren't the case with Chrome, I believe Gitea may have a similar limited regex for emails. Could you say if your email has `ł` in it? This isn't the root of what you are facing, but I'd be interested in knowing, as it could be another issue in the future. Finally, what you are facing is that there is a conflict between the usernames that BlenderID allows and the one that Gitea allows. What should happen is that Gitea should "gitealize" (for lack of a better word) the usernames it accepts from not just BlenderID, but all external OAuth2 systems, and when it doesn't, what you are running into happens. This conflict between usernames in both systems was discovered by BF previously, and the tool to synchronize BlenderID and Gitea users has the "gitealizer" in place. https://projects.blender.org/infrastructure/gitea-blenderid-webhook/src/branch/main/gitea_blenderid_webhook/gitea_users.py#L256 The next steps that should be taken are in Gitea upstream, the username modifier should be applied, so that even if an external system sends information in something it doesn't accept that a modifier should be used. Or, in the short term it could likely be applied to the "goth" blender_id go module. In-depth technical note/background information around why Gitea behaves in this way: For each user, a folder on disk is created to store repos, and due to some filesystems being incredibly restrictive with the folder names then since the goal of Gitea is to run "everywhere" it has to adopt the same restrictions. I'm linking this thread in a related chatroom rather than pinging specific BF folk directly as I'm not entirely sure of the etiquette in this repo, and don't want ping if that's not appropriate for this repo.
Member

Thanks @Matti-Ranta :D

I'm not sure if this issue should remain open here, or be moved to the infrastructure project to track?

Not sure what would be an appropriate repo for this bug report

https://projects.blender.org/infrastructure/gitea-blenderid-webhook
https://projects.blender.org/infrastructure/blender-id-oauth-client
https://projects.blender.org/infrastructure/gitea-custom


Could be related: #111937

Thanks @Matti-Ranta :D > I'm not sure if this issue should remain open here, or be moved to the infrastructure project to track? Not sure what would be an appropriate repo for this bug report https://projects.blender.org/infrastructure/gitea-blenderid-webhook https://projects.blender.org/infrastructure/blender-id-oauth-client https://projects.blender.org/infrastructure/gitea-custom - - - Could be related: #111937
Pratik Borhade added
Status
Needs Information from User
and removed
Status
Needs Triage
labels 2023-10-04 11:54:05 +02:00
Author

@Matti-Ranta I guess that email itself is not the main issue, rather it is the automatic username creation from the Full Name that can contain unicode characters, but the username seems to be permitting only English alphabet.

Example:

Registration form:

image

Completed registration (Note username of Andrzej-Białecki)

image

Aaaaand I guess a form validation error when trying to click "Complete Registration":

image

This is when trying to register the account to report a bug. I guess that yes this issue could be moved somewhere but I am not sure which repository owns such issues so unfortunately had to create it against blender.

@Matti-Ranta I guess that email itself is not the main issue, rather it is the automatic username creation from the Full Name that can contain unicode characters, but the username seems to be permitting only English alphabet. Example: Registration form: ![image](/attachments/9a4923c6-0432-4ceb-9527-2141b6951a17) Completed registration (Note username of Andrzej-Białecki) ![image](/attachments/9abcc983-9f22-4c9f-87fa-76916efca84c) Aaaaand I guess a form validation error when trying to click "Complete Registration": ![image](/attachments/bda52432-60c4-42a2-aa9c-e19263752f87) This is when trying to register the account to report a bug. I guess that yes this issue could be moved somewhere but I am not sure which repository owns such issues so unfortunately had to create it against blender.

I'm not sure if this issue should remain open here, or be moved to the infrastructure project to track?

It should be moved, indeed. If only Gitea supported moving issues between repositories 😉

This conflict between usernames in both systems was discovered by BF previously, and the tool to synchronize BlenderID and Gitea users has the "gitealizer" in place.
https://projects.blender.org/infrastructure/gitea-blenderid-webhook/src/branch/main/gitea_blenderid_webhook/gitea_users.py#L256

For the record, that was 302ab3884c

The next steps that should be taken are in Gitea upstream, the username modifier should be applied, so that even if an external system sends information in something it doesn't accept that a modifier should be used. Or, in the short term it could likely be applied to the "goth" blender_id go module.

The latter is what I've already done, at least for usernames. I would expect Gitea to accept emails as-is; it's been shown plenty of times that it's super hard to reliably and precisely validate email addresses. This is one of the reasons Blender ID just sends a validation email -- if that arrives properly, we're certain the address is valid.

> I'm not sure if this issue should remain open here, or be moved to the infrastructure project to track? It should be moved, indeed. If only Gitea supported moving issues between repositories 😉 > This conflict between usernames in both systems was discovered by BF previously, and the tool to synchronize BlenderID and Gitea users has the "gitealizer" in place. > https://projects.blender.org/infrastructure/gitea-blenderid-webhook/src/branch/main/gitea_blenderid_webhook/gitea_users.py#L256 For the record, that was https://github.com/blender/gitea/commit/302ab3884c73c0d5a7f8ef68eb1d52a448d3035b > The next steps that should be taken are in Gitea upstream, the username modifier should be applied, so that even if an external system sends information in something it doesn't accept that a modifier should be used. Or, in the short term it could likely be applied to the "goth" blender_id go module. The latter is what I've already done, at least for usernames. I would expect Gitea to accept emails as-is; it's been shown plenty of times that it's super hard to reliably and precisely validate email addresses. This is one of the reasons Blender ID just sends a validation email -- if that arrives properly, we're certain the address is valid.
Author

I'm not sure if this issue should remain open here, or be moved to the infrastructure project to track?

It should be moved, indeed. If only Gitea supported moving issues between repositories 😉

This conflict between usernames in both systems was discovered by BF previously, and the tool to synchronize BlenderID and Gitea users has the "gitealizer" in place.
https://projects.blender.org/infrastructure/gitea-blenderid-webhook/src/branch/main/gitea_blenderid_webhook/gitea_users.py#L256

For the record, that was 302ab3884c

The next steps that should be taken are in Gitea upstream, the username modifier should be applied, so that even if an external system sends information in something it doesn't accept that a modifier should be used. Or, in the short term it could likely be applied to the "goth" blender_id go module.

The latter is what I've already done, at least for usernames. I would expect Gitea to accept emails as-is; it's been shown plenty of times that it's super hard to reliably and precisely validate email addresses. This is one of the reasons Blender ID just sends a validation email -- if that arrives properly, we're certain the address is valid.

I guess that the issue is not with the email itself but with the Full Name being mapped to a generated username. Emails do not allow "special" characters.

"Your username is Andrzej-Białecki ..."

> > I'm not sure if this issue should remain open here, or be moved to the infrastructure project to track? > > It should be moved, indeed. If only Gitea supported moving issues between repositories 😉 > > > This conflict between usernames in both systems was discovered by BF previously, and the tool to synchronize BlenderID and Gitea users has the "gitealizer" in place. > > https://projects.blender.org/infrastructure/gitea-blenderid-webhook/src/branch/main/gitea_blenderid_webhook/gitea_users.py#L256 > > For the record, that was https://github.com/blender/gitea/commit/302ab3884c73c0d5a7f8ef68eb1d52a448d3035b > > > The next steps that should be taken are in Gitea upstream, the username modifier should be applied, so that even if an external system sends information in something it doesn't accept that a modifier should be used. Or, in the short term it could likely be applied to the "goth" blender_id go module. > > The latter is what I've already done, at least for usernames. I would expect Gitea to accept emails as-is; it's been shown plenty of times that it's super hard to reliably and precisely validate email addresses. This is one of the reasons Blender ID just sends a validation email -- if that arrives properly, we're certain the address is valid. > > I guess that the issue is not with the email itself but with the Full Name being mapped to a generated username. Emails do not allow "special" characters. "Your username is Andrzej-Białecki ..."

Emails do not allow "special" characters.

That depends on what you call "special". My email address sybren@stüvel.eu is perfectly valid.

> Emails do not allow "special" characters. That depends on what you call "special". My email address sybren@stüvel.eu is perfectly valid.
Member

@Kaszanas hi, if you're still encountering this problem, I'd suggest to open a new report at: https://projects.blender.org/infrastructure/blender-projects-platform/issues

This repo is to track bugs in blender software :)

For reference, add this report link in the new report.

@Kaszanas hi, if you're still encountering this problem, I'd suggest to open a new report at: https://projects.blender.org/infrastructure/blender-projects-platform/issues This repo is to track bugs in blender software :) For reference, add this report link in the new report.
Blender Bot added
Status
Archived
and removed
Status
Needs Information from User
labels 2024-03-01 08:03:30 +01:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#113222
No description provided.