nextcloud / nextcloud/groupfolders
Trailing whitespace not removed in folder names when using occ groupfolders:create command which can lead to broken nesting
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 343
- Forks
- 106
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 34
Description
How to use GitHub
- Please use the 👍 reaction to show that you are affected by the same issue.
- Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
- Subscribe to receive notifications on status change and new comments.
Steps to reproduce
- Create a groupfolder with trailing whitespace using the occ command and a subfolder:
sudo -u www-data php /var/www/nextcloud/occ groupfolders:create "Test folder "and thensudo -u www-data php /var/www/nextcloud/occ groupfolders:create "Test folder/Test Subfolder" - Observe that the folders do not nest properly:
- Observe that the trailing whitespace is visible in the Web GUI once the folder name is being edited:
Expected behaviour
Whitespace at the end or beginning of a folder name is automatically trimmed when the group folder is created as per: https://github.com/nextcloud/groupfolders/issues/2990
Actual behaviour
The trailing whitespace is not trimmed leading to issues with nesting
Server configuration
Operating system: Debian 12
Web server: NGINX
Database: Postgresql
PHP version: 8.2
Nextcloud version: (see Nextcloud admin page) 31.0.4
Team folders version: 19.0.4
Updated from an older Nextcloud/ownCloud or fresh install: updated
Where did you install Nextcloud from: official installation method
Are you using external storage, if yes which one: no
Are you using encryption: bo
Are you using an external user-backend, if yes which one: no
Client configuration
Browser: Firefox
Operating system: MacOS
Logs
No related error logs
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the occ groupfolders:create command and compare its handling of leading and trailing whitespace with the behavior described in issue #2990. Reproduce the nested-folder case, then verify that created group folder names are trimmed and that the subfolder appears under the intended parent in the Web GUI.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100