[node-patches] Change in ovirt-node[master]: Add validator for ssh port to only accpet "22" or "1024-65535"

fabiand at redhat.com fabiand at redhat.com
Tue Jul 15 15:34:46 UTC 2014


Fabian Deutsch has posted comments on this change.

Change subject: Add validator for ssh port to only accpet "22" or "1024-65535"
......................................................................


Patch Set 3: Code-Review-1

(1 comment)

http://gerrit.ovirt.org/#/c/29957/3/src/ovirt/node/setup/core/security_page.py
File src/ovirt/node/setup/core/security_page.py:

Line 54:         return {"strongrng.num_bytes": number_or_empty,
Line 55:                 "passwd.admin.password":
Line 56:                 valid.Empty() | valid.Text(min_length=5),
Line 57:                 "ssh.port":
Line 58:                 (valid.Number(exactly=22) | valid.Number(bounds=[1024, 65535]))
Please use the port validator  (valid.Port()) here.
That validator can also be extended to i.e. unprivileged ports, i.e. I can imagine the usage:

    valid.Port(22) | valid.Port(reserved=False)
Line 59:                 }
Line 60: 
Line 61:     def ui_content(self):
Line 62:         ws = [ui.Header("header[0]", _("Remote Access")),


-- 
To view, visit http://gerrit.ovirt.org/29957
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I4e5fe06ad0a1c8345e3b1265cbafdabc275bf1b5
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: hadong <hadong0720 at gmail.com>
Gerrit-Reviewer: Douglas Schilling Landgraf <dougsland at redhat.com>
Gerrit-Reviewer: Fabian Deutsch <fabiand at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes



More information about the node-patches mailing list