From de6f437f1ae160eee276eb28df27ab044491bb07 Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Fri, 2 Aug 2019 14:14:28 -0700 Subject: [PATCH] storage: Handle all device paths during eject Closes: #1618. When using RAID disk, the disks paths could look like /dev/dm-1. Current regular expression does not allow for '-' in the device path. Ensure that all characters in the device path are handled as part of eject operation. Signed-off-by: Sunil Mohan Adapa Reviewed-by: James Valleroy --- plinth/modules/storage/urls.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plinth/modules/storage/urls.py b/plinth/modules/storage/urls.py index 1eda3efa0..b39b07bb4 100644 --- a/plinth/modules/storage/urls.py +++ b/plinth/modules/storage/urls.py @@ -25,6 +25,6 @@ from . import views urlpatterns = [ url(r'^sys/storage/$', views.index, name='index'), url(r'^sys/storage/expand$', views.expand, name='expand'), - url(r'^sys/storage/eject/(?P[\w%]+)/$', views.eject, - name='eject') + url(r'^sys/storage/eject/(?P[A-Za-z0-9%_.\-~]+)/$', + views.eject, name='eject') ]