Open SohKa opened 2 weeks ago
Hum, I can't reproduce this error, but there's indeed a visible
prop on a section in the misc
tab:
[misc.tls_passthrough]
visible = "security_experimental_enabled"
[misc.tls_passthrough.tls_passthrough_enabled]
type = "boolean"
default = false
[misc.tls_passthrough.tls_passthrough_explain]
type = "alert"
style = "info"
icon = "info"
visible = "tls_passthrough_enabled"
[misc.tls_passthrough.tls_passthrough_list]
type = "tags"
# Regex is just <domain regex>;<destination>;<port>
pattern.regexp = '^(([^\W_A-Z]+([-]*[^\W_A-Z]+)*\.)+((xn--)?[^\W_]{2,}));(([^\W_A-Z]+([-]*[^\W_A-Z]+)*\.)+((xn--)?([^\W_]{2,}|[0-9]{1,3})));[0-9]{1,}$'
pattern.error = "You should specify a list of items formatted as DOMAIN;DESTINATION;DESTPORT, such as yolo.test;192.168.1.42;443"
default = ""
visible = "tls_passthrough_enabled"
We chose to not pass other panel's settings in context so this is expected to not work.
Should we move this section to the security
tab?
Describe the bug
In the Yunohost webadmin, under "Tools > YunoHost settings > Other", when I try to change setting
IP versions to consider for DNS configuration and diagnosis
fromBoth
toIPv4 only
, I get a 500 Unexpected server error.Via CLI, it works as expected.
Context
/etc/resolv.dnsmasq.conf
for the NextDNS ones. Also I've enable the settingExperimental security features
a few weeks ago, and I disabled it a few days ago (I don't rememeber if it was via webadmin or CLI)To reproduce
Webadmin
IP versions to consider for DNS configuration and diagnosis
to another valueCLI Here it works as expected:
========================================
Network
Info: Saving the new configuration... Success! Config updated as expected
Error: "500" Action: "PUT" /yunohost/api/settings/misc Error message: Unexpected server error Traceback (most recent call last): File "/usr/lib/python3/dist-packages/moulinette/interfaces/api.py", line 473, in process ret = self.actionsmap.process(arguments, timeout=30, route=_route) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/moulinette/actionsmap.py", line 561, in process return func(*arguments) ^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/yunohost/log.py", line 480, in func_wrapper result = func(args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/yunohost/settings.py", line 102, in settings_set return settings.set(key, value, args, args_file, operation_logger=operation_logger) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/yunohost/utils/configpanel.py", line 577, in set self.form = self._ask( ^^^^^^^^^^ File "/usr/lib/python3/dist-packages/yunohost/utils/configpanel.py", line 855, in _ask ) or not section.is_visible(context): ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/yunohost/utils/configpanel.py", line 169, in is_visible return evaluate_simple_js_expression(self.visible, context=context) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/yunohost/utils/form.py", line 216, in evaluate_simple_js_expression return evaluate_simple_ast(node, context) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/yunohost/utils/form.py", line 104, in evaluate_simple_ast return context[node.id]