⚠️ This issue respects the following points: ⚠️
Bug description
When uploading files with a small modification timestamp such as 1, Nextcloud returns the following error:
X-OC-MTime header must be a valid positive integer
Sometimes, only a generic HTTP 500 error is shown by the web interface and the user needs to check the network requests in the dev. console to see the error message.
This prevents uploading files built with Nix without previously changing the modification time for any of those files: Nix sets the timestamp to 1 for ensuring reproducible builds.
The bug occurs due to the check in apps/dav/lib/Connector/Sabre/MtimeSanitizer.php introduced in 69b8044.
As small timestamps such as 1 are perfectly valid values for the modification timestamp, they should be allowed.
Steps to reproduce
- Create a file with a low modification timestamp, e.g., via
touch -m -t 197001010100.01 abc.txt; or build something with Nix and try to upload the result.
- Try to upload the file, e.g., using the web interface.
Expected behavior
The files are uploaded successfully and the small timestamp value is preserved.
Installation method
Official All-in-One appliance
Nextcloud Server version
28
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
When uploading files with a small modification timestamp such as
1, Nextcloud returns the following error:Sometimes, only a generic HTTP 500 error is shown by the web interface and the user needs to check the network requests in the dev. console to see the error message.
This prevents uploading files built with Nix without previously changing the modification time for any of those files: Nix sets the timestamp to
1for ensuring reproducible builds.The bug occurs due to the check in
apps/dav/lib/Connector/Sabre/MtimeSanitizer.phpintroduced in 69b8044.As small timestamps such as
1are perfectly valid values for the modification timestamp, they should be allowed.Steps to reproduce
touch -m -t 197001010100.01 abc.txt; or build something with Nix and try to upload the result.Expected behavior
The files are uploaded successfully and the small timestamp value is preserved.
Installation method
Official All-in-One appliance
Nextcloud Server version
28
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