File tree Expand file tree Collapse file tree 3 files changed +14
-5
lines changed
bundles/org.eclipse.kura.web2/src/main/java/org/eclipse/kura/web Expand file tree Collapse file tree 3 files changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -935,7 +935,7 @@ private void initForm() {
935935 });
936936
937937 this .password .addBlurHandler (e -> this .password .validate ());
938- this .password .setAllowBlank (false );
938+ this .password .setAllowBlank (true );
939939 this .password .addMouseOutHandler (event -> resetHelp ());
940940
941941 this .buttonPassword .addClickHandler (event -> {
@@ -1300,6 +1300,8 @@ private void setPasswordValidation() {
13001300 this .password .setValidatorsFrom (Optional .empty (), passwordStrengthRequirements );
13011301 this .password
13021302 .addValidator (GwtValidators .regex (REGEX_PASS_WEP , MSGS .netWifiWirelessInvalidWEPPassword ()));
1303+ } else if (this .security != null && this .security .getSelectedItemText ().equals (WIFI_SECURITY_NONE_MESSAGE )) {
1304+ this .password .setValidators ();
13031305 } else {
13041306 passwordStrengthRequirements .allowAnyPassword ();
13051307 this .password .setValidatorsFrom (Optional .empty (), passwordStrengthRequirements );
@@ -1716,6 +1718,7 @@ private boolean checkPassword() {
17161718 this .groupPassword .setValidationState (ValidationState .ERROR );
17171719 result = false ;
17181720 } else {
1721+ TabWirelessUi .this .helpPassword .setText ("" );
17191722 this .groupPassword .setValidationState (ValidationState .NONE );
17201723 }
17211724
Original file line number Diff line number Diff line change 3030import org .eclipse .kura .web .shared .model .GwtNetRouterMode ;
3131import org .eclipse .kura .web .shared .model .GwtWifiConfig ;
3232import org .eclipse .kura .web .shared .model .GwtWifiNetInterfaceConfig ;
33+ import org .eclipse .kura .web .shared .model .GwtWifiSecurity ;
3334import org .slf4j .Logger ;
3435import org .slf4j .LoggerFactory ;
3536
@@ -234,7 +235,9 @@ private void setWifiMasterProperties() throws GwtKuraException {
234235
235236 this .properties .setWifiMasterPassphrase (this .ifname , gwtApConfig .getPassword ());
236237 } else {
237- GwtServerUtil .validateUserPassword (Optional .empty (), gwtWifiConfig .getPassword ());
238+ if (!gwtWifiConfig .getSecurity ().equals (GwtWifiSecurity .netWifiSecurityNONE .name ())) {
239+ GwtServerUtil .validateUserPassword (Optional .empty (), gwtWifiConfig .getPassword ());
240+ }
238241 this .properties .setWifiMasterPassphrase (this .ifname , gwtWifiConfig .getPassword ());
239242 }
240243 }
Original file line number Diff line number Diff line change @@ -771,16 +771,19 @@ public static List<GwtNetInterfaceConfig> replaceNetworkConfigListSensitivePassw
771771 if (netConfig instanceof GwtWifiNetInterfaceConfig ) {
772772 GwtWifiNetInterfaceConfig wifiConfig = (GwtWifiNetInterfaceConfig ) netConfig ;
773773 GwtWifiConfig gwtAPWifiConfig = wifiConfig .getAccessPointWifiConfig ();
774- if (gwtAPWifiConfig != null ) {
774+ if (gwtAPWifiConfig != null && gwtAPWifiConfig .getPassword () != null
775+ && !gwtAPWifiConfig .getPassword ().isEmpty ()) {
775776 gwtAPWifiConfig .setPassword (PASSWORD_PLACEHOLDER );
776777 }
777778
778779 GwtWifiConfig gwtStationWifiConfig = wifiConfig .getStationWifiConfig ();
779- if (gwtStationWifiConfig != null ) {
780+ if (gwtStationWifiConfig != null && gwtStationWifiConfig .getPassword () != null
781+ && !gwtStationWifiConfig .getPassword ().isEmpty ()) {
780782 gwtStationWifiConfig .setPassword (PASSWORD_PLACEHOLDER );
781783 }
782784 Gwt8021xConfig gwt8021xConfig = wifiConfig .get8021xConfig ();
783- if (gwt8021xConfig != null ) {
785+ if (gwt8021xConfig != null && gwt8021xConfig .getPassword () != null
786+ && !gwt8021xConfig .getPassword ().isEmpty ()) {
784787 gwt8021xConfig .setPassword (PASSWORD_PLACEHOLDER );
785788 }
786789
You can’t perform that action at this time.
0 commit comments