[Bug]: Planka v2 - API Call - /users/:id #795

Open
opened 2026-02-04 21:21:56 +03:00 by OVERLORD · 1 comment
Owner

Originally created by @BechtelCanDoIt on GitHub (Aug 23, 2025).

Where is the problem occurring?

I encountered the problem while interacting with the server (Backend)

What browsers are you seeing the problem on?

Other

Current behavior

Using /api/users/1184222251092804609 gave regex error response:

"code": "E_MISSING_OR_INVALID_PARAMS",
    "problems": [
        "Invalid \"id\":\n  · Value ('1184222251092804609') did not match the configured regular expression (/\/^[1-9][0-9]*$\/|^me$/)"
    ],
    "message": "The server could not fulfill this request (`GET /api/users/1184222251092804609`) due to 1 missing or invalid parameter."
}

After reviewing the regex rule with chatgpt I found it only allows:

That rule says the id must be a positive integer with no leading zero or exactly me. 
The anchors mean full string match only.

Five values that pass
me, 1, 7, 42, 999999

Notes
^ start of string
$ end of string
[1-9][0-9]* means one nonzero digit then zero or more digits

Desired behavior

User id, by id in database or me, should pass validation and return record.

Steps to reproduce

  1. I used the /api/users api and pulled all users and found my record:

{ "items": [ { "id": "1184222251092804609", "createdAt": "2024-02-19T16:58:13.222Z", ...

  1. I then took the value from id and used it in /api/users/1184222251092804609
  2. Receive E_MISSING_OR_INVALID_PARAMS error

Other information

I also called /api/users/me. That successfully returned my record.

Originally created by @BechtelCanDoIt on GitHub (Aug 23, 2025). ### Where is the problem occurring? I encountered the problem while interacting with the server (Backend) ### What browsers are you seeing the problem on? Other ### Current behavior Using /api/users/1184222251092804609 gave regex error response: ``` "code": "E_MISSING_OR_INVALID_PARAMS", "problems": [ "Invalid \"id\":\n · Value ('1184222251092804609') did not match the configured regular expression (/\/^[1-9][0-9]*$\/|^me$/)" ], "message": "The server could not fulfill this request (`GET /api/users/1184222251092804609`) due to 1 missing or invalid parameter." } ``` After reviewing the regex rule with chatgpt I found it only allows: ``` That rule says the id must be a positive integer with no leading zero or exactly me. The anchors mean full string match only. Five values that pass me, 1, 7, 42, 999999 Notes ^ start of string $ end of string [1-9][0-9]* means one nonzero digit then zero or more digits ``` ### Desired behavior User id, by id in database or me, should pass validation and return record. ### Steps to reproduce 1. I used the /api/users api and pulled all users and found my record: ` { "items": [ { "id": "1184222251092804609", "createdAt": "2024-02-19T16:58:13.222Z", ... ` 2. I then took the value from id and used it in /api/users/1184222251092804609 3. Receive E_MISSING_OR_INVALID_PARAMS error ### Other information I also called /api/users/me. That successfully returned my record.
Author
Owner

@meltyshev commented on GitHub (Aug 24, 2025):

Hey! Thanks for reporting this. It was fixed a few days ago, so everything should work correctly in the new release. We're aiming to release the final v2 version at the beginning of September :)

@meltyshev commented on GitHub (Aug 24, 2025): Hey! Thanks for reporting this. It was fixed a few days ago, so everything should work correctly in the new release. We're aiming to release the final v2 version at the beginning of September :)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/planka#795