Skip to content

[stable35] fix: accept string node ids from the Files sidebar when requesting a signature - #8395

Merged
vitormattos merged 1 commit into
stable35from
backport/8367/stable35
Sep 13, 2026
Merged

vitormattos merged 1 commit into
stable35from
backport/8367/stable35

Conversation

@backportbot-libresign

@backportbot-libresign backportbot-libresign Bot commented Sep 13, 2026

Copy link
Copy Markdown

Backport of #8367

Warning, This backport's changes differ from the original and might be incomplete ⚠️

Todo

  • Review and resolve any conflicts
  • Review and verify the backported changes
  • Amend HEAD commit to remove the line stating to skip CI

Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

…gnature

fix: keep string node ids from the Files sidebar when requesting a signature

`tab.ts` builds `fileInfo.id` from `node.fileid ?? node.id`. With

`@nextcloud/files`, `fileid` is the deprecated numeric getter and is

`undefined` when the id does not fit a JavaScript number, while `id` is

always a string; a file copied in the Files app and opened in the

sidebar hits this path too. `AppFilesTab.update()` stored that string as

`nodeId` unchanged, but `serializeRequestFile()` only accepted numbers,

so the request went out without `file` and the API answered 422 "File

or files parameter is required".

Keep `nodeId` in the string domain instead of converting it: the

serializer forwards a positive integer or a string of digits as it is,

and the API accepts both. `fileId` and `id` only ever come from the

LibreSign API as numbers and are not touched. The `FileInfo.id` type of

`AppFilesTab` now matches what `tab.ts` sends.

Tests follow the sidebar path with a node id above

`Number.MAX_SAFE_INTEGER`: `tab.ts` keeps the string, `AppFilesTab`

passes it through, and the store sends it unchanged for a single file

and for envelope files; the empty id `tab.ts` falls back to is still not

sent.

Resolves: #8363

Assisted-by: Claude Code:claude-opus-5

Signed-off-by: André Maia <andrefnkmm@gmail.com>

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
@github-project-automation github-project-automation Bot moved this from 0. Backlog to 1. to do in Roadmap Sep 13, 2026
@vitormattos
vitormattos merged commit 9335fcb into stable35 Sep 13, 2026
63 checks passed
@vitormattos
vitormattos deleted the backport/8367/stable35 branch September 13, 2026 22:37
@github-project-automation github-project-automation Bot moved this from 1. to do to 4. to release in Roadmap Sep 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: 4. to release

Development

Successfully merging this pull request may close these issues.

2 participants