Closed wget closed 3 years ago
@wget thanks! so we are avoiding to add the add/delete button now if these things shouldn't be manually configured according to the (most likely) correct menu logic, see 4dbc220490. If you want to try you can do so via:
# opnsense-patch 4dbc220490
Cheers, Franco
@fichtner Will definitely check! Thanks :)
@fichtner I tried the logic on 21.1 and unfortunately we still can bypass it.
When disabling the Allow manual adjustment of DHCPv6 and Router Advertisements
option, reaching a page like:
/services_dhcpv6_edit.php?if=lan&duid=00:03:00:01:6c:c2:17:9b:4e:e0&hostname=
should NOT be allowed. The end user should be redirected to the main (dashboard page).
This actually happens for all the other pages as well. If we are being denied, we should be prevented accessing and be redirected.
Right, it should be looking for the parent (likely "wan"), but it is looking for "lan"
No wait that was silly. I'll try to fix it this morning in any case :)
Did you try the page link manually? The add button should already disappear, no?
@fichtner Yes the + button link has already disappeared following your patch :)
And yes, I reached the page manually. This is quite common when you use your browser history a lot. I often see SMB companies documenting things using direct links to the WebUI 😱
What we really want is a patch to avoid configuring things we shouldn't have access to. 🤗
Ah ok. Now I have all the context :) The question is where would we want to redirect? It's already some sort of parent page. We could move to the dashboard but someone else might interpret it as a bug, too. What do you think?
@fichtner In all CMS I have been using like Magento, WordPress, etc., they have implemented this as two solutions: report an in context 404 or a redirection to the dashboard. So maybe this page would be the more common choice and be less perceived as a bug? :) ⤵️
Describe the bug
Allow manual adjustment of DHCPv6 and Router Advertisements
checked.+
, then I press on theCancel
button from the mapping edition page, I'm redirected to the DHCPv6 configuration page (/services_dhcpv6.php?if=lan) and I shouldn't be allowed.To Reproduce Steps to reproduce the behavior:
Allow manual adjustment of DHCPv6 and Router Advertisements
is unchecked.Cancel
buttonExpected behavior
We shouldn't be allowed.
Screenshots
See above.
Relevant log files
N/A
Additional context
I led an additional test:
Allow manual adjustment of DHCPv6 and Router Advertisements
Stateless
option)radvdump
, and noticedAdvManagedFlag off;
(my changes were thus taken into consideration)Allow manual adjustment of DHCPv6 and Router Advertisements
checkbox)Allow manual adjustment of DHCPv6 and Router Advertisements
radvdump
, and noticedAdvManagedFlag on;
(the config seems to be reset \o/)It looks like the config is properly reset when the aforementioned checkbox is unchecked. So this bug is bug is not /that/ bad as this configuration reset process seems not impacted :)
Environment
Software:
Hardware: