nextcloud/all-in-one · warning · InvalidSettingConfigurationException
You entered unallowed characters! Problematic is ${entry}
Error message
You entered unallowed characters! Problematic is ${entry} What it means
Thrown by setAdditionalBackupDirectories when a line of the newline-separated input matches neither ^/[.0-9a-zA-Z/_-]+$ (absolute path) nor ^[.0-9a-zA-Z_-]+$ (bare name treated as a host directory under the docker volumes prefix). Entries are trimmed first, so whitespace alone is fine; any other character (colon, space inside the path, unicode, backslash) rejects that line.
Source
Thrown at php/src/Data/ConfigurationManager.php:986
}
public function deleteDailyBackupTime() : void {
if (file_exists(DataConst::GetDailyBackupTimeFile())) {
unlink(DataConst::GetDailyBackupTimeFile());
}
$this->dailyBackupFileCache = '';
$this->dailyBackupFileMtime = 0;
}
public function setAdditionalBackupDirectories(string $additionalBackupDirectories) : void {
$additionalBackupDirectoriesArray = explode("\n", $additionalBackupDirectories);
$validDirectories = '';
foreach($additionalBackupDirectoriesArray as $entry) {
// Trim all unwanted chars on both sites
$entry = trim($entry);
if ($entry !== "") {
if (!preg_match("#^/[.0-9a-zA-Z/_-]+$#", $entry) && !preg_match("#^[.0-9a-zA-Z_-]+$#", $entry)) {
throw new InvalidSettingConfigurationException("You entered unallowed characters! Problematic is " . $entry);
}
$validDirectories .= rtrim($entry, '/') . PHP_EOL;
}
}
if ($validDirectories === '') {
unlink(DataConst::GetAdditionalBackupDirectoriesFile());
} else {
file_put_contents(DataConst::GetAdditionalBackupDirectoriesFile(), $validDirectories);
}
}
public function getAdditionalBackupDirectoriesString() : string {
if (!file_exists(DataConst::GetAdditionalBackupDirectoriesFile())) {
return '';
}
return (string)file_get_contents(DataConst::GetAdditionalBackupDirectoriesFile());
}View on GitHub (pinned to 6b788eec5e)
Solutions
- Use plain absolute Linux paths containing only letters, digits, dots, underscores, hyphens and slashes, one per line.
- Remove spaces, colons and backslashes from each entry.
- For directories with disallowed characters, create a symlink with a clean name on the host and add the symlink path instead.
Example fix
// before $dirs = "/mnt/backup data\n/backups:ro"; // after $dirs = "/mnt/backup_data\n/backups";
Defensive patterns
Strategy: validation
Validate before calling
$ok = preg_match('#^/[.0-9a-zA-Z/_-]+$#', $entry) || preg_match('#^[.0-9a-zA-Z_-]+$#', $entry);
if (!$ok) {
// sanitize or reject the line before submitting the form
} Prevention
- Normalize paths to POSIX style and strip spaces/colons before submission.
- Symlink oddly-named directories to clean names on the host.
When it happens
Trigger: Submitting additional_backup_directories containing entries like 'C:\data' (backslash), '/mnt/my data' (space), '/backups:ro' (colon), or relative paths with dots not matching the bare-name pattern such as '../etc'.
Common situations: Windows-style paths pasted into the form; copy-pasting paths with trailing remarks or spaces inside; assuming docker-style volume syntax (host:container:mode) is accepted here.
Related errors
- The daily backup time must not be empty!
- You did not enter a correct time! One correct example is '04
- Domain must contain at least one dot!
- Domain must not contain slashes!
- Domain must not contain colons!
AI-assisted analysis of nextcloud/all-in-one@6b788eec5e (2026-08-21).
Data as JSON: /api/errors/2a97516b07092743.
Report an issue: GitHub.