Skip to content

fix: upload to Android-invalid folder paths#17317

Open
sgallese wants to merge 1 commit into
nextcloud:masterfrom
sgallese:sg/filename-parent-path-validation
Open

fix: upload to Android-invalid folder paths#17317
sgallese wants to merge 1 commit into
nextcloud:masterfrom
sgallese:sg/filename-parent-path-validation

Conversation

@sgallese

@sgallese sgallese commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Fix uploads into server folders whose names contain characters Android cannot use in local path segments.
  • Sanitize only the temporary local upload path derived from the remote path; the remote destination path is unchanged.
  • Validate local download paths segment-by-segment before creating Android files.

Fixes #14711.

Testing

Manual validation against a local Nextcloud 31 server:

  • Created a server folder named test <3.
  • Logged into the Android app and opened that folder.
  • Uploaded nextcloud-pr7-video-upload.txt from local device storage into test <3.
  • Confirmed the uploaded file appeared in the app alongside the seed file.
  • Verified the uploaded file over WebDAV and checked the downloaded content matched the local file.

🖼️ Screenshots

Uploaded file inside test <3 after the fix:
Uploaded file inside test <3 after the fix

🎥 Videos

User-flow upload into test <3 (21 seconds):

nextcloud-user-upload-14711-short2.mp4

🏁 Checklist

  • ⛑️ Tests (unit and/or integration) are included or not needed
  • 🔙 Backport requests are created or not needed: /backport to stable-xx.x
  • Milestone: maintainers can add one if needed.
  • 🌸 PR title is meaningful (if it should be in the changelog: is it meaningful to users?)

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI

Signed-off-by: Sebastian Gallese <140911+sgallese@users.noreply.github.com>
@sgallese
sgallese force-pushed the sg/filename-parent-path-validation branch from 177b7af to 3f1d503 Compare July 10, 2026 14:52
@github-actions

Copy link
Copy Markdown

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.

Mobile app cannot upload to folders who's names contain symbols

1 participant