⚠️ This issue respects the following points: ⚠️
Bug description
With the new IFilenameValidator implementation I would expect IFolder->newFile() to throw an error if passed file name is invalid. But it seems like that's not the case. newFile() still returns a File object and only further operation on this object fail. I guess there's a bug somewhere.
I discovered this issue while developing nextcloud/text#6271.
Steps to reproduce
- Call
IFolder->newFile() with windows compatibility turned on and an invalid filename as argument
- See that it returns a File object instead of throwing an exception
Expected behavior
I would expect IFolder->newFile() to throw an error if passed file name is invalid.
Installation method
None
Nextcloud Server version
master
Operating system
None
PHP engine version
None
Web server
None
Database engine version
None
Is this bug present after an update or on a fresh install?
None
Are you using the Nextcloud Server Encryption module?
None
What user-backends are you using?
Configuration report
No response
List of activated Apps
No response
Nextcloud Signing status
No response
Nextcloud Logs
No response
Additional info
No response
Bug description
With the new
IFilenameValidatorimplementation I would expectIFolder->newFile()to throw an error if passed file name is invalid. But it seems like that's not the case.newFile()still returns a File object and only further operation on this object fail. I guess there's a bug somewhere.I discovered this issue while developing nextcloud/text#6271.
Steps to reproduce
IFolder->newFile()with windows compatibility turned on and an invalid filename as argumentExpected behavior
I would expect
IFolder->newFile()to throw an error if passed file name is invalid.Installation method
None
Nextcloud Server version
master
Operating system
None
PHP engine version
None
Web server
None
Database engine version
None
Is this bug present after an update or on a fresh install?
None
Are you using the Nextcloud Server Encryption module?
None
What user-backends are you using?
Configuration report
No response
List of activated Apps
No response
Nextcloud Signing status
No response
Nextcloud Logs
No response
Additional info
No response