mirror of
https://dev.iopsys.eu/bbf/icwmp.git
synced 2026-02-17 17:51:30 +01:00
secret values like passwords and keys suold not be set in the cache when the SPV is updating the cache
This commit is contained in:
parent
23ad50a95c
commit
5a0ebbd982
5 changed files with 21 additions and 16 deletions
|
|
@ -103,6 +103,7 @@ freecwmp_cache_output() {
|
|||
local get_cmd="$7"
|
||||
local notif_permission="$8"
|
||||
local forced_inform="$9"
|
||||
local secret_value="$10"
|
||||
|
||||
json_init
|
||||
json_add_string "parameter" "$parameter"
|
||||
|
|
@ -116,6 +117,7 @@ freecwmp_cache_output() {
|
|||
json_add_string "value" "$value"
|
||||
fi
|
||||
if [ "$forced_inform" != "" ]; then json_add_string "forced_inform" "$forced_inform"; fi
|
||||
if [ "$secret_value" != "" ]; then json_add_string "secret_value" "$secret_value"; fi
|
||||
json_close_object
|
||||
MSG=`json_dump`
|
||||
echo "$MSG"
|
||||
|
|
@ -775,10 +777,13 @@ set_param_value_generic() {
|
|||
return $FAULT_CPE_NON_WRITABLE_PARAMETER
|
||||
fi
|
||||
eval "$set_cmd"
|
||||
|
||||
json_add_string "value" "$val"
|
||||
json_close_object
|
||||
echo "`json_dump`" >> $set_tmp_file
|
||||
|
||||
json_get_var secret_value secret_value
|
||||
if [ "$secret_value" != "1" ]; then
|
||||
json_add_string "value" "$val"
|
||||
json_close_object
|
||||
echo "`json_dump`" >> $set_tmp_file
|
||||
fi
|
||||
return $FAULT_CPE_NO_FAULT
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -589,7 +589,7 @@ get_landevice_wlanconfiguration_generic() {
|
|||
get_param_cache_generic "InternetGatewayDevice.LANDevice.$lan_num.WLANConfiguration.$wlan_num.MACAddressControlEnabled" "1" "get_wlan_mac_control_enable $uci_num" "set_wlan_mac_control_enable $uci_num \$val" "" "xsd:boolean"
|
||||
get_param_cache_generic "InternetGatewayDevice.LANDevice.$lan_num.WLANConfiguration.$wlan_num.Standard" "1" "get_wlan_standard $uci_num" "set_wlan_standard $uci_num \$val"
|
||||
get_param_cache_generic "InternetGatewayDevice.LANDevice.$lan_num.WLANConfiguration.$wlan_num.WEPKeyIndex" "1" "get_wlan_wep_key_index $uci_num" "set_wlan_wep_key_index $uci_num \$val" "" "xsd:unsignedInt"
|
||||
get_param_cache_generic "InternetGatewayDevice.LANDevice.$lan_num.WLANConfiguration.$wlan_num.KeyPassphrase" "1" "" "set_wlan_key_passphrase $uci_num \$val"
|
||||
get_param_cache_generic "InternetGatewayDevice.LANDevice.$lan_num.WLANConfiguration.$wlan_num.KeyPassphrase" "1" "" "set_wlan_key_passphrase $uci_num \$val" "" "" "" "" "" "1"
|
||||
get_param_cache_generic "InternetGatewayDevice.LANDevice.$lan_num.WLANConfiguration.$wlan_num.WEPEncryptionLevel" "0" "get_wlan_wep_encryption_level $uci_num"
|
||||
get_param_cache_generic "InternetGatewayDevice.LANDevice.$lan_num.WLANConfiguration.$wlan_num.BasicEncryptionModes" "1" "get_wlan_basic_encryption_modes $uci_num" "set_wlan_basic_encryption_modes $uci_num \$val"
|
||||
get_param_cache_generic "InternetGatewayDevice.LANDevice.$lan_num.WLANConfiguration.$wlan_num.BasicAuthenticationMode" "1" "get_wlan_basic_authentication_mode $uci_num" "set_wlan_basic_authentication_mode $uci_num \$val"
|
||||
|
|
@ -606,14 +606,14 @@ get_landevice_wlanconfiguration_generic() {
|
|||
get_object_cache_generic "InternetGatewayDevice.LANDevice.$lan_num.WLANConfiguration.$wlan_num.WEPKey.2." "0"
|
||||
get_object_cache_generic "InternetGatewayDevice.LANDevice.$lan_num.WLANConfiguration.$wlan_num.WEPKey.3." "0"
|
||||
get_object_cache_generic "InternetGatewayDevice.LANDevice.$lan_num.WLANConfiguration.$wlan_num.WEPKey.4." "0"
|
||||
get_param_cache_generic "InternetGatewayDevice.LANDevice.$lan_num.WLANConfiguration.$wlan_num.WEPKey.1.WEPKey" "1" "" "set_wlan_wep_key $uci_num \$val"
|
||||
get_param_cache_generic "InternetGatewayDevice.LANDevice.$lan_num.WLANConfiguration.$wlan_num.WEPKey.2.WEPKey" "1" "" "set_wlan_wep_key $uci_num \$val"
|
||||
get_param_cache_generic "InternetGatewayDevice.LANDevice.$lan_num.WLANConfiguration.$wlan_num.WEPKey.3.WEPKey" "1" "" "set_wlan_wep_key $uci_num \$val"
|
||||
get_param_cache_generic "InternetGatewayDevice.LANDevice.$lan_num.WLANConfiguration.$wlan_num.WEPKey.4.WEPKey" "1" "" "set_wlan_wep_key $uci_num \$val"
|
||||
get_param_cache_generic "InternetGatewayDevice.LANDevice.$lan_num.WLANConfiguration.$wlan_num.WEPKey.1.WEPKey" "1" "" "set_wlan_wep_key $uci_num \$val" "" "" "" "" "" "1"
|
||||
get_param_cache_generic "InternetGatewayDevice.LANDevice.$lan_num.WLANConfiguration.$wlan_num.WEPKey.2.WEPKey" "1" "" "set_wlan_wep_key $uci_num \$val" "" "" "" "" "" "1"
|
||||
get_param_cache_generic "InternetGatewayDevice.LANDevice.$lan_num.WLANConfiguration.$wlan_num.WEPKey.3.WEPKey" "1" "" "set_wlan_wep_key $uci_num \$val" "" "" "" "" "" "1"
|
||||
get_param_cache_generic "InternetGatewayDevice.LANDevice.$lan_num.WLANConfiguration.$wlan_num.WEPKey.4.WEPKey" "1" "" "set_wlan_wep_key $uci_num \$val" "" "" "" "" "" "1"
|
||||
get_object_cache_generic "InternetGatewayDevice.LANDevice.$lan_num.WLANConfiguration.$wlan_num.PreSharedKey." "0"
|
||||
get_object_cache_generic "InternetGatewayDevice.LANDevice.$lan_num.WLANConfiguration.$wlan_num.PreSharedKey.1." "0"
|
||||
get_param_cache_generic "InternetGatewayDevice.LANDevice.$lan_num.WLANConfiguration.$wlan_num.PreSharedKey.1.PreSharedKey" "1" "" "set_wlan_pre_shared_key $uci_num 1 \$val"
|
||||
get_param_cache_generic "InternetGatewayDevice.LANDevice.$lan_num.WLANConfiguration.$wlan_num.PreSharedKey.1.KeyPassphrase" "1" "" "set_wlan_pre_shared_key_key_passphrase $uci_num 1 \$val"
|
||||
get_param_cache_generic "InternetGatewayDevice.LANDevice.$lan_num.WLANConfiguration.$wlan_num.PreSharedKey.1.PreSharedKey" "1" "" "set_wlan_pre_shared_key $uci_num 1 \$val" "" "" "" "" "" "1"
|
||||
get_param_cache_generic "InternetGatewayDevice.LANDevice.$lan_num.WLANConfiguration.$wlan_num.PreSharedKey.1.KeyPassphrase" "1" "" "set_wlan_pre_shared_key_key_passphrase $uci_num 1 \$val" "" "" "" "" "" "1"
|
||||
get_param_cache_generic "InternetGatewayDevice.LANDevice.$lan_num.WLANConfiguration.$wlan_num.PreSharedKey.1.AssociatedDeviceMACAddress" "1" "" "set_wlan_pre_shared_key_associated_device_MACAddress $uci_num 1 \$val"
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -67,14 +67,14 @@ get_cache_InternetGatewayDevice_ManagementServer() {
|
|||
get_object_cache_generic "InternetGatewayDevice.ManagementServer." "0" "0"
|
||||
get_param_cache_generic "InternetGatewayDevice.ManagementServer.URL" "1" "$UCI_GET cwmp.acs.url" "set_management_server_url \$val"
|
||||
get_param_cache_generic "InternetGatewayDevice.ManagementServer.Username" "1" "$UCI_GET cwmp.acs.userid" "set_management_server cwmp.acs.userid \$val"
|
||||
get_param_cache_generic "InternetGatewayDevice.ManagementServer.Password" "1" "" "set_management_server cwmp.acs.passwd \$val"
|
||||
get_param_cache_generic "InternetGatewayDevice.ManagementServer.Password" "1" "" "set_management_server cwmp.acs.passwd \$val" "" "" "" "" "" "1"
|
||||
get_param_cache_generic "InternetGatewayDevice.ManagementServer.ParameterKey" "1" "$UCI_GET cwmp.acs.ParameterKey" "set_management_server cwmp.acs.ParameterKey \$val" "" "" "0" "1"
|
||||
get_param_cache_generic "InternetGatewayDevice.ManagementServer.PeriodicInformEnable" "1" "$UCI_GET cwmp.acs.periodic_inform_enable" "set_management_server cwmp.acs.periodic_inform_enable \$val" "" "xsd:boolean"
|
||||
get_param_cache_generic "InternetGatewayDevice.ManagementServer.PeriodicInformInterval" "1" "$UCI_GET cwmp.acs.periodic_inform_interval" "set_management_server cwmp.acs.periodic_inform_interval \$val" "" "xsd:unsignedInt"
|
||||
get_param_cache_generic "InternetGatewayDevice.ManagementServer.PeriodicInformTime" "1" "get_management_server_periodic_inform_time" "set_management_server_periodic_inform_time \$val" "" "xsd:dateTime"
|
||||
get_param_cache_generic "InternetGatewayDevice.ManagementServer.ConnectionRequestURL" "0" "" "" "get_management_server_connection_request_url" "" "0" "1" "2"
|
||||
get_param_cache_generic "InternetGatewayDevice.ManagementServer.ConnectionRequestUsername" "1" "$UCI_GET cwmp.cpe.userid" "set_management_server cwmp.cpe.userid \$val"
|
||||
get_param_cache_generic "InternetGatewayDevice.ManagementServer.ConnectionRequestPassword" "1" "" "set_management_server cwmp.cpe.passwd \$val"
|
||||
get_param_cache_generic "InternetGatewayDevice.ManagementServer.ConnectionRequestPassword" "1" "" "set_management_server cwmp.cpe.passwd \$val" "" "" "" "" "" "1"
|
||||
}
|
||||
|
||||
get_dynamic_InternetGatewayDevice_ManagementServer() {
|
||||
|
|
|
|||
|
|
@ -512,7 +512,7 @@ get_services_voice_service_generic() {
|
|||
get_param_cache_generic "InternetGatewayDevice.Services.VoiceService.1.VoiceProfile.$profile_num.SIP.RegisterRetryInterval" "1" "$UCI_GET voice_client.SIP.registertimeout" "set_sip_register_retry_interval $sip_id \$val" "" "xsd:unsignedInt"
|
||||
# get_param_cache_generic "InternetGatewayDevice.Services.VoiceService.1.VoiceProfile.$profile_num.SIP.InboundAuth" "1" "" "set_sip_inbound_auth $sip_id \$val"
|
||||
# get_param_cache_generic "InternetGatewayDevice.Services.VoiceService.1.VoiceProfile.$profile_num.SIP.InboundAuthUsername" "1" "" "set_sip_inbound_auth_username $sip_id \$val"
|
||||
# get_param_cache_generic "InternetGatewayDevice.Services.VoiceService.1.VoiceProfile.$profile_num.SIP.InboundAuthPassword" "1" "" "set_sip_inbound_auth_password $sip_id \$val"
|
||||
# get_param_cache_generic "InternetGatewayDevice.Services.VoiceService.1.VoiceProfile.$profile_num.SIP.InboundAuthPassword" "1" "" "set_sip_inbound_auth_password $sip_id \$val" "" "" "" "" "" "1"
|
||||
get_param_cache_generic "InternetGatewayDevice.Services.VoiceService.1.VoiceProfile.$profile_num.SIP.X_002207_CallLines" "1" "$UCI_GET voice_client.sip$sip_id.call_lines" "set_sip_x_002207_call_lines $sip_id \$val"
|
||||
}
|
||||
|
||||
|
|
@ -531,7 +531,7 @@ get_services_voice_service_line_generic() {
|
|||
get_param_cache_generic "InternetGatewayDevice.Services.VoiceService.1.VoiceProfile.$profile_num.Line.$line_num.X_002207_LineProfile" "1" "get_line_x_002207_line_profile $sip_id $line_name" "set_line_x_002207_line_profile $sip_id $line_name \$val"
|
||||
get_object_cache_generic "InternetGatewayDevice.Services.VoiceService.1.VoiceProfile.$profile_num.Line.$line_num.SIP." "0"
|
||||
get_param_cache_generic "InternetGatewayDevice.Services.VoiceService.1.VoiceProfile.$profile_num.Line.$line_num.SIP.AuthUserName" "1" "$UCI_GET voice_client.sip$sip_id.authuser" "set_line_sip_auth_username $sip_id $line_name \$val"
|
||||
get_param_cache_generic "InternetGatewayDevice.Services.VoiceService.1.VoiceProfile.$profile_num.Line.$line_num.SIP.AuthPassword" "1" "" "set_line_sip_auth_password $sip_id $line_name \$val"
|
||||
get_param_cache_generic "InternetGatewayDevice.Services.VoiceService.1.VoiceProfile.$profile_num.Line.$line_num.SIP.AuthPassword" "1" "" "set_line_sip_auth_password $sip_id $line_name \$val" "" "" "" "" "" "1"
|
||||
get_param_cache_generic "InternetGatewayDevice.Services.VoiceService.1.VoiceProfile.$profile_num.Line.$line_num.SIP.URI" "1" "get_line_sip_uri $sip_id $line_name" "set_line_sip_uri $sip_id $line_name \$val"
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -306,7 +306,7 @@ get_cache_InternetGatewayDevice_WANDevice() {
|
|||
get_param_cache_generic "InternetGatewayDevice.WANDevice.$dev.WANConnectionDevice.$wan.WANPPPConnection.$wan_ppp.ConnectionStatus" "0" "" "" "get_wan_device_ppp_status $iface"
|
||||
get_param_cache_generic "InternetGatewayDevice.WANDevice.$dev.WANConnectionDevice.$wan.WANPPPConnection.$wan_ppp.ExternalIPAddress" "0" "" "" "get_wan_device_ppp_interface_ip $iface" "" "$notif_permission" "$forced_inform_eip" "$forced_notify"
|
||||
get_param_cache_generic "InternetGatewayDevice.WANDevice.$dev.WANConnectionDevice.$wan.WANPPPConnection.$wan_ppp.Username" "1" "$UCI_GET network.$iface.username" "$UCI_SET network.$iface.username=\$val"
|
||||
get_param_cache_generic "InternetGatewayDevice.WANDevice.$dev.WANConnectionDevice.$wan.WANPPPConnection.$wan_ppp.Password" "1" "" "$UCI_SET network.$iface.password=\$val"
|
||||
get_param_cache_generic "InternetGatewayDevice.WANDevice.$dev.WANConnectionDevice.$wan.WANPPPConnection.$wan_ppp.Password" "1" "" "$UCI_SET network.$iface.password=\$val" "" "" "" "" "" "1"
|
||||
let wan_ppp=$wan_ppp+1
|
||||
fi
|
||||
prev_wan="$wan"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue