We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a747be3 + 3757b34 commit 228911cCopy full SHA for 228911c
lib/private/Config.php
@@ -285,6 +285,13 @@ private function writeData() {
285
'This can usually be fixed by giving the webserver write access to the config directory.');
286
}
287
288
+ // Never write file back if disk space should be too low
289
+ $df = disk_free_space($this->configDir);
290
+ $size = strlen($content) + 10240;
291
+ if ($df !== false && (int)$df < $size) {
292
+ throw new \Exception($this->configDir . " does not have enough space for writing the config file! Not writing it back!");
293
+ }
294
+
295
// Try to acquire a file lock
296
if (!flock($filePointer, LOCK_EX)) {
297
throw new \Exception(sprintf('Could not acquire an exclusive lock on the config file %s', $this->configFilePath));
0 commit comments