mirror of
				https://gitlab.nic.cz/turris/reforis/foris-js.git
				synced 2025-11-03 23:00:31 +01:00 
			
		
		
		
	Fix WiFi password max length check
The WiFi password cannot be longer than 63 symbols.
This commit is contained in:
		@@ -82,6 +82,10 @@ export function validator(formData) {
 | 
			
		||||
 | 
			
		||||
        if (device.password.length < 8)
 | 
			
		||||
            errors.password = _("Password must contain at least 8 symbols");
 | 
			
		||||
        if (device.password.length >= 64)
 | 
			
		||||
            errors.password = _(
 | 
			
		||||
                "Password must not contain more than 63 symbols"
 | 
			
		||||
            );
 | 
			
		||||
 | 
			
		||||
        if (!device.guest_wifi.enabled) return errors;
 | 
			
		||||
 | 
			
		||||
@@ -97,6 +101,10 @@ export function validator(formData) {
 | 
			
		||||
            guest_wifi_errors.password = _(
 | 
			
		||||
                "Password must contain at least 8 symbols"
 | 
			
		||||
            );
 | 
			
		||||
        if (device.guest_wifi.password.length >= 64)
 | 
			
		||||
            guest_wifi_errors.password = _(
 | 
			
		||||
                "Password must not contain more than 63 symbols"
 | 
			
		||||
            );
 | 
			
		||||
 | 
			
		||||
        if (guest_wifi_errors.SSID || guest_wifi_errors.password) {
 | 
			
		||||
            errors.guest_wifi = guest_wifi_errors;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user