mirror of
https://github.com/openwrt/luci.git
synced 2025-12-21 19:14:34 +04:00
luci-proto-wireguard: add extra checks for hostname when building qr
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
This commit is contained in:
@@ -724,12 +724,12 @@ return network.registerProtocol('wireguard', {
|
|||||||
var hostnames = [];
|
var hostnames = [];
|
||||||
|
|
||||||
uci.sections('ddns', 'service', function(s) {
|
uci.sections('ddns', 'service', function(s) {
|
||||||
if (typeof(s.lookup_host) == 'string' && s.enabled == '1')
|
if (typeof(s?.lookup_host) == 'string' && s?.enabled == '1')
|
||||||
hostnames.push(s.lookup_host);
|
hostnames.push(s.lookup_host);
|
||||||
});
|
});
|
||||||
|
|
||||||
uci.sections('system', 'system', function(s) {
|
uci.sections('system', 'system', function(s) {
|
||||||
if (typeof(s.hostname) == 'string' && s.hostname.indexOf('.') > 0)
|
if (typeof(s?.hostname) == 'string' && s?.hostname?.indexOf('.') > 0)
|
||||||
hostnames.push(s.hostname);
|
hostnames.push(s.hostname);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user