Skip to content

fix(recording): support long room tokens for uploads - #18491

Open
pollychen-lab wants to merge 2 commits into
nextcloud:mainfrom
pollychen-lab:fix/issue-18458-recording-upload-key-length
Open

fix(recording): support long room tokens for uploads#18491
pollychen-lab wants to merge 2 commits into
nextcloud:mainfrom
pollychen-lab:fix/issue-18458-recording-upload-key-length

Conversation

@pollychen-lab

Copy link
Copy Markdown

Summary

Keep recording upload app-config keys within Nextcloud's 64-character limit when a conversation uses a long room token.

Root cause

The upload key combines the recupload/ prefix, room token, separator, and a 40-character SHA-1 filename hash. A maximum-length 30-character room token produces an 81-character key, causing chunked upload setup to fail.

Changes

  • Size the filename hash according to the remaining app-config key space.
  • Preserve the full SHA-1 hash for normal room tokens.
  • Add regression coverage for both the existing short-token case and the maximum 30-character token.

At the maximum token length, the filename hash retains 23 hexadecimal characters (92 bits).

Validation

  • PHP 8.3 syntax checks for both changed files
  • Nextcloud PHP coding-standard check
  • Boundary checks for short and maximum-length room tokens
  • git diff --check

Fixes #18458

Signed-off-by: Polly Labs <pollychen.lab@gmail.com>
@nickvergessen

Copy link
Copy Markdown
Member

Comment thread lib/Service/RecordingService.php Outdated
Signed-off-by: Polly Labs <pollychen.lab@gmail.com>
@github-actions

Copy link
Copy Markdown
Contributor

Hello there,
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.

We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process.

Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6

Thank you for contributing to Nextcloud and we hope to hear from you soon!

(If you believe you should not receive this message, you can add yourself to the blocklist.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Recording chunked upload would fail with token length > 13

2 participants