Open drewbino-rcg opened 1 year ago
👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.
Debug mode
Describe the bug
When attempting to generate a manual backup through the Admin area, a "500 Server Error" appears.
In debug mode, the error is:
See additional context below for possible solution.
Reproduction steps
On a Snipe IT installation running on Windows:
Expected behavior
The page should refresh and show that a new backup file has been generated.
Screenshots
No response
Snipe-IT Version
v6.1.1-pre - build 10653 (master)
Operating System
Windows
Web Server
IIS
PHP Version
8.0.28
Operating System
Windows
Browser
MS Edge
Version
113
Device
No response
Operating System
No response
Browser
No response
Version
No response
Error messages
Additional context
I followed the stack trace back and I think I found the issue:
Line 1139 of app/Http/Controllers/SettingsController.php is specifying a datetime format for the backup filename that contains colons (
date('Y-m-d-H:i:s')
), which are not allowed in Windows filenames.https://github.com/snipe/snipe-it/blob/869d195b35f100a9022b72a78f5b27cde7d800ac/app/Http/Controllers/SettingsController.php#LL1139C13-L1139C13
Replacing the colons with hyphens fixes the issue.