RDKB-64863 GUI displays incorrect security mode [Open (Risky)] after …#123
Open
pavankumar464 wants to merge 2 commits into
Open
RDKB-64863 GUI displays incorrect security mode [Open (Risky)] after …#123pavankumar464 wants to merge 2 commits into
pavankumar464 wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
This PR aims to fix cases where the WebUI shows an incorrect Wi‑Fi security mode (e.g., “Open (risky)”) after a factory reset by centralizing/making consistent the mapping between ModeEnabled + EncryptionMethod and the UI’s security-mode representation, including handling for AES+GCMP.
Changes:
- Replaced inline security mapping logic in multiple wireless edit pages with a shared mapping helper call.
- Removed duplicated
security_mode()implementations from action handlers and moved/centralized the function into a shared include. - Updated
encrypt_map()to normalizeAES+GCMPfor display purposes.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| source/Styles/xb6/jst/wireless_network_configuration_edit.jst | Switches $security computation to a shared mapping helper. |
| source/Styles/xb6/jst/wireless_network_configuration_edit_onewifi.jst | Switches $security computation to a shared mapping helper (OneWiFi variant). |
| source/Styles/xb6/jst/actionHandler/ajaxSet_wireless_network_configuration_edit.jst | Removes local security_mode() to rely on shared include. |
| source/Styles/xb6/jst/actionHandler/ajaxSet_wireless_network_configuration_edit_onewifi.jst | Removes local security_mode() to rely on shared include (OneWiFi variant). |
| source/Styles/xb3/jst/wireless_network_configuration_edit.jst | Switches $security computation to a shared mapping helper. |
| source/Styles/xb3/jst/includes/utility.jst | Updates encrypt_map() to normalize AES+GCMP and refactors normalization logic. |
| source/Styles/xb3/jst/includes/actionHandlerUtility.jst | Adds centralized security_mode() implementation used by action handlers. |
| source/Styles/xb3/jst/actionHandler/ajaxSet_wireless_network_configuration_edit.jst | Removes local security_mode() to rely on shared include. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
189
to
192
| if ("1-11"==$possible_channels) | ||
| $possible_channels = "1,2,3,4,5,6,7,8,9,10,11"; | ||
| $security = "None"; | ||
| if ("WPA2-Personal" == $encrypt_mode){ | ||
| if ("TKIP" == $encrypt_method){ | ||
| $security = "WPA2_PSK_TKIP"; | ||
| } | ||
| else if ("AES" == $encrypt_method){ | ||
| $security = "WPA2_PSK_AES"; | ||
| } | ||
| }else if ("WPA3-Personal" == $encrypt_mode){ | ||
| if ("AES" == $encrypt_method) | ||
| $security = "WPA3-Personal Only"; | ||
| }else if ("WPA3-Personal-Transition" == $encrypt_mode){ | ||
| if ("AES" == $encrypt_method) | ||
| $security = "WPA3-Personal Transition"; | ||
| } | ||
| else{ | ||
| $security = "None"; | ||
| } | ||
| $security = encrypt_map($encrypt_mode, $encrypt_method); | ||
|
|
Comment on lines
199
to
202
| if ("1-11"==$possible_channels) | ||
| $possible_channels = "1,2,3,4,5,6,7,8,9,10,11"; | ||
| $security = "None"; | ||
| if ("WPA2-Personal" == $encrypt_mode){ | ||
| if ("TKIP" == $encrypt_method){ | ||
| $security = "WPA2_PSK_TKIP"; | ||
| } | ||
| else if ("AES" == $encrypt_method){ | ||
| $security = "WPA2_PSK_AES"; | ||
| } | ||
| }else if ("WPA3-Personal" == $encrypt_mode){ | ||
| if ("AES" == $encrypt_method) | ||
| $security = "WPA3-Personal Only"; | ||
| }else if ("WPA3-Personal-Transition" == $encrypt_mode){ | ||
| if ("AES" == $encrypt_method) | ||
| $security = "WPA3-Personal Transition"; | ||
| }else if ("WPA3-Personal-Compatibility" == $encrypt_mode){ | ||
| if ("AES" == $encrypt_method) | ||
| $security = "WPA3-Personal Compatibility"; | ||
| } | ||
| else{ | ||
| $security = "None"; | ||
| } | ||
| $security = encrypt_map($encrypt_mode, $encrypt_method); | ||
|
|
Comment on lines
+160
to
+161
| $security = encrypt_map($encrypt_mode, $encrypt_method); | ||
|
|
Comment on lines
+395
to
+410
| if ("AES" == $encrypt_method) | ||
| $security = "WPA3-Personal Only"; | ||
| else if("AES+GCMP" == $encrypt_method) | ||
| $security = "WPA3-Personal Only AES_GCMP"; | ||
| } | ||
| else if ("WPA3-Personal-Transition" == $encrypt_mode){ | ||
| if ("AES" == $encrypt_method) | ||
| $security = "WPA3-Personal Transition"; | ||
| else if("AES+GCMP" == $encrypt_method) | ||
| $security = "WPA3-Personal Transition AES_GCMP"; | ||
| } | ||
| else if ("WPA3-Personal-Compatibility" == $encrypt_mode){ | ||
| if ("AES" == $encrypt_method) | ||
| $security = "WPA3-Personal Compatibility"; | ||
| else if("AES+GCMP" == $encrypt_method) | ||
| $security = "WPA3-Personal Compatibility AES_GCMP"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…a Factory Reset