-
-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed VM name validation in GUI tools (Create VM, Settings, Manager) (R3.2) #112
Conversation
VM name validation in various places in Manager did not allow perfectly legal otherwise '_' and '.' characters. references QubesOS/qubes-issues#2422 fixes QubesOS/qubes-issues#3301
qubesmanager/create_new_vm.py
Outdated
@@ -74,7 +74,7 @@ def __init__(self, app, qvm_collection, trayIcon, parent = None): | |||
self.fill_template_list() | |||
self.fill_netvm_list() | |||
|
|||
self.vmname.setValidator(QRegExpValidator(QRegExp("[a-zA-Z0-9-]*", Qt.CaseInsensitive), None)) | |||
self.vmname.setValidator(QRegExpValidator(QRegExp("[a-zA-Z0-9_-.]*", Qt.CaseInsensitive), None)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-
needs to be the last character in set ([]
), otherwise it means a characters range.
qubesmanager/main.py
Outdated
@@ -368,7 +368,7 @@ def __init__(self, qvm_collection, blk_manager, parent=None): | |||
self.blk_watch_thread.start() | |||
|
|||
self.searchbox = SearchBox() | |||
self.searchbox.setValidator(QRegExpValidator(QRegExp("[a-zA-Z0-9-]*", Qt.CaseInsensitive), None)) | |||
self.searchbox.setValidator(QRegExpValidator(QRegExp("[a-zA-Z0-9_-.]*", Qt.CaseInsensitive), None)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And here.
qubesmanager/settings.py
Outdated
@@ -206,7 +206,7 @@ def current_tab_changed(self, idx): | |||
|
|||
def __init_basic_tab__(self): | |||
self.vmname.setText(self.vm.name) | |||
self.vmname.setValidator(QRegExpValidator(QRegExp("[a-zA-Z0-9-]*", Qt.CaseInsensitive), None)) | |||
self.vmname.setValidator(QRegExpValidator(QRegExp("[a-zA-Z0-9_-.]*", Qt.CaseInsensitive), None)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And here.
As per @marmarek's request.
VM name validation in various places in Manager did not allow
perfectly legal otherwise '_' and '.' characters.
references QubesOS/qubes-issues#2422
fixes QubesOS/qubes-issues#3301