inverse-inc / packetfence

PacketFence is a fully supported, trusted, Free and Open Source network access control (NAC) solution. Boasting an impressive feature set including a captive-portal for registration and remediation, centralized wired and wireless management, powerful BYOD management options, 802.1X support, layer-2 isolation of problematic devices; PacketFence can be used to effectively secure networks small to very large heterogeneous networks.
https://packetfence.org
GNU General Public License v2.0
1.37k stars 287 forks source link

WebAdmin: Default ghost values #6195

Closed fdurand closed 3 years ago

fdurand commented 3 years ago

Describe the bug Advanced Access Configuration -> Captive portal -> Captive Portal detection mechanism URLs should be emtpy.

image

satkunas commented 3 years ago

This is a placeholder coming from meta.

# /usr/local/pf/sbin/pfperl-api get -M OPTIONS /api/v1/config/base/captive_portal | jq '.meta.detection_mecanism_urls.placeholder'
"http://www.gstatic.com/generate_204,http://clients3.google.com/generate_204,http://www.apple.com/library/test/success,http://connectivitycheck.android.com/generate_204,http://connectivitycheck.gstatic.com/generate_204,http://www.msftncsi.com/ncsi.txt,http://www.appleiphonecell.com,http://captive.apple.com,http://captive.roku.com/ok,http://detectportal.firefox.com/success.txt,http://www.msftconnecttest.com/connecttest.txt,http://fireoscaptiveportal.com/generate_204,http://connectivitycheck.cbg-app.huawei.com/generate_204,http://connect.rom.miui.com/generate_204,http://freetimecaptiveportal.com/generate_204,http://gateway.zscalerthree.net/generate_204,http://gateway.zscloud.net/generate_204,http://g.cn/generate_204,http://play.googleapis.com/generate_204,http://speedtest-global.spatialbuzz.net/generate_204,http://tabletcaptiveportal.com/generate204,http://www.google.cn/generate_204"

If we want to avoid populating the placeholder with defaults, we'll need to move this to a new meta property.

satkunas commented 3 years ago

@fdurand @jrouzierinverse how do we want to proceed?

jrouzierinverse commented 3 years ago

What should be the name of the field instead of placeholder?

satkunas commented 3 years ago

@jrouzierinverse and I agree to utilize a new key in order to communicate additional context - such as this one - from the backend. Since this bug is cosmetic and doesn't "break" the ui, but making the proposed change may introduce regressions I am moving the milestone post 10.3.