mirror of
git://git.proxmox.com/git/pve-storage.git
synced 2025-01-08 21:18:06 +03:00
iscsi: disallow slashes in volname
The last part of an iSCSI volname is assumed to be a stable name found in /dev/disk/by-id. These are not allowed to have `/` in their names. Reported-by: Friedrich Weber <f.weber@proxmox.com> Signed-off-by: Mira Limbeck <m.limbeck@proxmox.com> Tested-by: Friedrich Weber <f.weber@proxmox.com> Reviewed-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
parent
962d1ee1d0
commit
ef6c17851b
@ -316,7 +316,7 @@ sub options {
|
||||
sub parse_volname {
|
||||
my ($class, $volname) = @_;
|
||||
|
||||
if ($volname =~ m!^\d+\.\d+\.\d+\.(\S+)$!) {
|
||||
if ($volname =~ m!^\d+\.\d+\.\d+\.([^/\s]+)$!) {
|
||||
return ('images', $1, undef, undef, undef, undef, 'raw');
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user