Univention Bugzilla – Attachment 5568 Details for
Bug 30816
Support of VLAN, Bonding, Bridges
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Fix interface name regular expressions
30816_umc-network-regexp.diff (text/plain), 1.93 KB, created by
Philipp Hahn
on 2013-11-05 15:16 CET
(
hide
)
Description:
Fix interface name regular expressions
Filename:
MIME Type:
Creator:
Philipp Hahn
Created:
2013-11-05 15:16 CET
Size:
1.93 KB
patch
obsolete
>diff --git a/branches/ucs-3.2/ucs-3.2-0/base/univention-system-setup/umc/js/setup/InterfaceWizard.js b/branches/ucs-3.2/ucs-3.2-0/base/univention-system-setup/umc/js/setup/InterfaceWizard.js >index 09190fe..5999ca9 100644 >--- a/branches/ucs-3.2/ucs-3.2-0/base/univention-system-setup/umc/js/setup/InterfaceWizard.js >+++ b/branches/ucs-3.2/ucs-3.2-0/base/univention-system-setup/umc/js/setup/InterfaceWizard.js >@@ -171,7 +171,9 @@ define([ > name: 'name', > type: TextBox, > validator: function(value) { >- return (/^[a-z]+[0-9]+(\.[0-9]+)?$/).test(value); >+ if (value.length > 15 || value === '.' || value === '..') >+ return false; >+ return /^(?![.]{1,2}$)[^/ \t\n\r\f]{1,15}(\.[0-9]+)?$/.test(value) > }, > visible: false > }, { >@@ -182,7 +184,7 @@ define([ > type: TextBox, > validator: lang.hitch(this, function(value) { > if (this.getInterfaceType() === 'Bond' || this.getInterfaceType() === 'Bridge') { >- return (/^[a-zA-Z]+[0-9]+$/).test(value); >+ return /^(?![.]{1,2}$)[^/ \t\n\r\f]{1,15}$/.test(value) > } > return true; > }), >diff --git a/branches/ucs-3.2/ucs-3.2-0/base/univention-system-setup/umc/python/setup/network.py b/branches/ucs-3.2/ucs-3.2-0/base/univention-system-setup/umc/python/setup/network.py >index 4157f5d..9466407 100644 >--- a/branches/ucs-3.2/ucs-3.2-0/base/univention-system-setup/umc/python/setup/network.py >+++ b/branches/ucs-3.2/ucs-3.2-0/base/univention-system-setup/umc/python/setup/network.py >@@ -48,7 +48,7 @@ _ = Translation('univention-management-console-module-setup').translate > > RE_INTERFACE = re.compile(r'^interfaces/(?!(?:primary|restart/auto|handler)$)([^/]+?)(_[0-9]+)?/') > RE_IPV6_ID = re.compile(r'^[a-zA-Z0-9]+\Z') >-#VALID_NAME_RE = re.compile(r'^(?![.]{1,2})[^/ \t\n\r\f]{1,15}\Z') >+#VALID_NAME_RE = re.compile(r'^(?![.]{1,2}\Z)[^/ \t\n\r\f]{1,15}\Z') > > PHYSICAL_INTERFACES = [dev['name'] for dev in detect_interfaces()] >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
|
Diff
Attachments on
bug 30816
:
5352
|
5496
|
5498
|
5499
|
5509
| 5568