mirror of
https://github.com/unraid/webgui.git
synced 2026-05-04 16:59:27 -05:00
Merge pull request #596 from Squidly271/patch-19
Disallow characters incompatible with FAT32 in share names
This commit is contained in:
@@ -93,11 +93,11 @@ foreach ($rows as $row) echo $row;
|
||||
<input type="hidden" name="shareNameOrig" value="<?=htmlspecialchars($share['nameOrig'])?>">
|
||||
|
||||
Share name:
|
||||
: <input type="text" name="shareName" maxlength="40" value="<?=htmlspecialchars($name)?>" pattern="^[^/\\]*$" title="Slashes are not allowed">
|
||||
: <input type="text" name="shareName" maxlength="40" value="<?=htmlspecialchars($name)?>">
|
||||
|
||||
> The share name can be up to 40 characters, and is case-sensitive with these restrictions:
|
||||
>
|
||||
> * cannot contain a double-quote character (")
|
||||
> * cannot contain a double-quote character (") or the following characters: / \ * < > |
|
||||
> * cannot be one of the reserved share names: flash, cache, cach2, .., disk1, disk2, ..
|
||||
>
|
||||
> We highly recommend to make your life easier and avoid special characters.
|
||||
@@ -321,6 +321,10 @@ function prepareEdit(form) {
|
||||
swal('Invalid share name', 'Do not use reserved names', 'error');
|
||||
return false;
|
||||
}
|
||||
if (share.match('[:\\\/*<>|"]')) {
|
||||
swal('Invalid Characters', 'You cannot use the following within share names : \\ / * < > | "','error');
|
||||
return false;
|
||||
}
|
||||
form.shareName.value = share;
|
||||
// Adjust minimum free space value to selected unit
|
||||
var unit = 'KB,MB,GB,TB,PB';
|
||||
|
||||
Reference in New Issue
Block a user