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

Firefox Relay Username Generator Fails with Long URLs (>30 characters) #14140

Open
1 task done
PsychoSanchez opened this issue Apr 5, 2025 · 4 comments · May be fixed by #14141
Open
1 task done

Firefox Relay Username Generator Fails with Long URLs (>30 characters) #14140

PsychoSanchez opened this issue Apr 5, 2025 · 4 comments · May be fixed by #14141

Comments

@PsychoSanchez
Copy link

Steps To Reproduce

Steps to Reproduce (via existing login item):

  1. Open an existing login item via the web app or browser extension.
  2. Click "Edit".
  3. Scroll to the Auto-fill options section.
  4. In the Website (URI) field, enter a URL longer than 255 characters.
  5. Click "Save".
  6. Reopen the item by clicking "Edit" again.
  7. Launch the Username Generator tool.
  8. Select the radio buttons for both "Username" and "Forwarded email alias".
  9. From the Service dropdown, choose "Firefox Relay".
  10. Provide a valid Firefox Relay API Access Token in the appropriate field.
  11. Click "Regenerate username".

Alternative Steps (via new login item creation):

  1. Navigate to a website with a long URL (e.g., a Shopify auth link with redirects exceeding 255 characters).
  2. Click "New Item" from the extension.
  3. Open the Username Generator tool.
  4. Select "Username" and "Forwarded email alias".
  5. Select "Firefox Relay" in the Service dropdown.
  6. Enter a valid Firefox Relay API Access Token.
  7. Click "Regenerate username".

Expected Result

A new, valid Firefox Relay email alias is generated and displayed, correctly linked to the user's Firefox Relay account.

Actual Result

The username generator fails to generate an alias. Instead, a toast notification appears with the message:
"Unknown Firefox Relay error occurred."

Screenshots or Videos

Image

Additional Context

Additional Context from Chrome Developer Tools

The issue stems from server-side validation constraints in the Firefox Relay API. Specifically:

  • generated_for field is limited to 255 characters
  • description field is limited to 64 characters

Example 1 – description too long:

Request payload:

{
    "enabled": true,
    "generated_for": "https://www.maxgaming.gg/cgi-bin/ibutik/AIR_ibutik.fcgi?funk=bestall_steg1#",
    "description": "Website: https://www.maxgaming.gg/cgi-bin/ibutik/AIR_ibutik.fcgi?funk=bestall_steg1#. Generated by Bitwarden."
}

Response:

{
    "description": [
        "Ensure this field has no more than 64 characters."
    ]
}

Example 2 – generated_for too long:

Request payload:

{
    "enabled": true,
    "generated_for": "https://www.maxgaming.gg/cgi-bin/ibutik/asdaasddsaasddasasddasasdasdasddasasddasasgdfasghdfashgdfahfsdhgasfhdfashfdhasfdhagsfdhgasfdhasgfdhgafdhfashdfashgdfhafsdhfasdhfasdfhafdhagsfdhafshdfahsdfhasfdhasfdhasfdhfahsdhasgfdkjhasdkhjgasjghdsaghjdasgasdjhgasdjhgasdhjgasdjghasd",
    "description": "Website: https://www.maxgaming.gg. Generated by Bitwarden."
}

Response:

{
  "generated_for": [
    "Ensure this field has no more than 255 characters."
  ]
}

Operating System

macOS

Operating System Version

15.2 (24C101)

Web Browser

Chrome

Browser Version

134.0.6998.89

Build Version

Version: 2025.2.2 SDK: 'main (6008e90)' Server version: 2025.3.3

Issue Tracking Info

  • I understand that work is tracked outside of Github. A PR will be linked to this issue should one be opened to address it, but Bitwarden doesn't use fields like "assigned", "milestone", or "project" to track progress.
@S-Kakar
Copy link

S-Kakar commented Apr 5, 2025

Thank you for reporting this issue! We've added this to our internal tracking system.
ID: PM-19913

@JdotCarver
Copy link

I can also add that the issue is the same with Addy.io.
Getting this error :

Image

Many thanks to the smartboi who made API Errors appear as toasts. Makes this kind of bug hunting a breeze. Though they don't appear in the username generation UI ! Maybe you'll want to add that.

@audreyality
Copy link
Member

audreyality commented Apr 7, 2025

Many thanks to the smartboi who made API Errors appear as toasts. Makes this kind of bug hunting a breeze. Though they don't appear in the username generation UI ! Maybe you'll want to add that.

Why thank you @JdotCarver! I added those when I rebuilt the forwarders on top of Rpc! Prior, some forwarders included error messages and others didn't.

Could you explain what you mean by "they don't appear in the username generation UI?" Is it that you want the error to appear on the UI instead of a toast?

@JdotCarver
Copy link

JdotCarver commented Apr 8, 2025

Could you explain what you mean by "they don't appear in the username generation UI?" Is it that you want the error to appear on the UI instead of a toast?

Oh no, no, they are great as is @audreyality ! They dont appear enough hahaha. Explanation :

Issue

When the error cited above occurs, you are in the "username generation" UI. The issue is, the toast notifying you of that error does not appear in that UI! So you spam the "generate username button" nothing happens, and nothing appears either in this case. You must have the clarity of mind to at least back out of the username generation for the error message to appear.

I'm not sure if this was intentional or not.
I can upload a screen record if you'd find it more convenient. :)

Edit: This might warrant a new issue thread altogether.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants