Skip to content

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

Closed
@PsychoSanchez

Description

@PsychoSanchez

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions