[stable34] fix: accept string node ids from the Files sidebar when requesting a signature - #8394
Closed
backportbot-libresign[bot] wants to merge 1 commit into
Closed
backportbot-libresign[bot] wants to merge 1 commit into
backportbot-libresign[bot] wants to merge 1 commit into
Conversation
vitormattos
force-pushed
the
backport/8367/stable34
branch
3 times, most recently
from
September 13, 2026 22:04
af83687 to
5185198
Compare
…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>
vitormattos
force-pushed
the
backport/8367/stable34
branch
from
September 13, 2026 22:17
5185198 to
84d4665
Compare
Merged
1 task
Contributor
|
This cherry-pick only carried the frontend commit (the backend one conflicted), so on |
Closed
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #8367
Warning, This backport's changes differ from the original and might be incomplete⚠️
Todo
Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.