Skip to content

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

Closed
backportbot-libresign[bot] wants to merge 1 commit into
stable33from
backport/8367/stable33
Closed

backportbot-libresign[bot] wants to merge 1 commit into
stable33from
backport/8367/stable33

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>
@maia-andre

Copy link
Copy Markdown
Contributor

Same as #8394: only the frontend commit was carried. #8397 replaces it with the frontend commit plus the branch-specific backend fix, and documents the stable33 affectedness check you asked for. Could you close this one in favour of #8397?

@github-project-automation github-project-automation Bot moved this from 0. Backlog 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