Skip to content
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

Merged
merged 2 commits into from
Jul 17, 2018

Conversation

marmarta
Copy link
Member

@marmarta marmarta commented Jul 13, 2018

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

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
@@ -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))
Copy link
Member

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.

@@ -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))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And here.

@@ -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))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And here.

@marmarek marmarek merged commit e36e236 into QubesOS:release3.2 Jul 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants