Skip to content

[BUG] Username containing - is invalid #484

@arcoast

Description

@arcoast

Prerequisites

Rclone Pre-flight Checklist (if applicable)

  • This issue is NOT related to rclone (skip if not using rclone)
  • I have tested rclone listremotes and rclone lsd remote: on the host and they work
  • I have verified the rclone config is mounted into the container
  • I have restarted the container after config changes

Bug Description

It's possible to create a username containing -

Image

however an invalid username error is then generated when you attempt to login with this user.

Image

Steps to Reproduce

  1. Create a new user with username as user-test
  2. Attempt to login with this user.

Expected Behavior

Either a message to explain that usernames can only use alphanumeric characters (or ideally prevent the creation of a username with an invalid character)

Or allow the use of (certain) special characters in the username.

Zerobyte version / commit

v0.26

Deployment Method

Docker

Backup/Repository Context

N/A

Logs / Error Messages

use-server-events-Bk_BXvNp.js:1 [SSE] Connected to server events
use-server-events-Bk_BXvNp.js:1 [SSE] Mirror copy completed: Object
use-server-events-Bk_BXvNp.js:1 [SSE] Backup started: Object
use-server-events-Bk_BXvNp.js:1 [SSE] Connected to server events
use-server-events-Bk_BXvNp.js:1 [SSE] Backup completed: Object
use-server-events-Bk_BXvNp.js:1 [SSE] Mirror copy started: Object
use-server-events-Bk_BXvNp.js:1 [SSE] Backup completed: Object
use-server-events-Bk_BXvNp.js:1 [SSE] Mirror copy started: Object
use-server-events-Bk_BXvNp.js:1 [SSE] Disconnecting from server events
use-server-events-Bk_BXvNp.js:1 [SSE] Mirror copy completed: Object
use-server-events-Bk_BXvNp.js:1 [SSE] Mirror copy started: Object
use-server-events-Bk_BXvNp.js:1 [SSE] Mirror copy completed: Object
username:1  Failed to load resource: the server responded with a status of 422 ()
login-QLCSWJF7.js:1 Object
P @ login-QLCSWJF7.js:1
bootstrap-autofill-overlay.js:643 Uncaught (in promise) NotFoundError: Failed to execute 'insertBefore' on 'Node': The node before which the new node is to be inserted is not a child of this node.
    at Ha.Node.insertBefore (bootstrap-autofill-overlay.js:643:17235)
    at AutofillInlineMenuContentService.<anonymous> (bootstrap-autofill-overlay.js:5504:30)
    at Generator.next (<anonymous>)
    at fulfilled (bootstrap-autofill-overlay.js:5202:58)
bootstrap-autofill-overlay.js:643 Uncaught (in promise) NotFoundError: Failed to execute 'insertBefore' on 'Node': The node before which the new node is to be inserted is not a child of this node.
    at Ha.Node.insertBefore (bootstrap-autofill-overlay.js:643:17235)
    at AutofillInlineMenuContentService.<anonymous> (bootstrap-autofill-overlay.js:5504:30)
    at Generator.next (<anonymous>)
    at fulfilled (bootstrap-autofill-overlay.js:5202:58)
username:1  Failed to load resource: the server responded with a status of 422 ()
login-QLCSWJF7.js:1 Object
P @ login-QLCSWJF7.js:1
username:1  Failed to load resource: the server responded with a status of 422 ()
login-QLCSWJF7.js:1 Object
P @ login-QLCSWJF7.js:1
context-DSRlsmZS.js:1  POST https://zerobyte.DOMAIN.COM/api/auth/sign-in/username 422 (Unprocessable Content)
ce @ context-DSRlsmZS.js:1
await in ce
t @ context-DSRlsmZS.js:1
apply @ context-DSRlsmZS.js:1
P @ login-QLCSWJF7.js:1
(anonymous) @ form-_dCw2Md_.js:1
await in (anonymous)
Om @ entry.client-Cwa0xnAY.js:8
(anonymous) @ entry.client-Cwa0xnAY.js:8
Bi @ entry.client-Cwa0xnAY.js:8
Zc @ entry.client-Cwa0xnAY.js:8
Pc @ entry.client-Cwa0xnAY.js:9
Bd @ entry.client-Cwa0xnAY.js:9
login-QLCSWJF7.js:1 {code: 'USERNAME_IS_INVALID', message: 'Username is invalid', status: 422, statusText: ''}
P @ login-QLCSWJF7.js:1
await in P
(anonymous) @ form-_dCw2Md_.js:1
await in (anonymous)
Om @ entry.client-Cwa0xnAY.js:8
(anonymous) @ entry.client-Cwa0xnAY.js:8
Bi @ entry.client-Cwa0xnAY.js:8
Zc @ entry.client-Cwa0xnAY.js:8
Pc @ entry.client-Cwa0xnAY.js:9
Bd @ entry.client-Cwa0xnAY.js:9

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions