-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Closed
Description
With commit 293e55c softAP setup with passphrases shorter than 8 characters are rejected strlen(passphrase) < 8.
The old behaviour was to allow an empty passphrase to configure AUTH_OPEN mode.
In a lot of code examples floating around in the internet those empty strings are used so this commit breaks them.
| if(passphrase && (strlen(passphrase) > 63 || strlen(passphrase) < 8)) { |
if(passphrase && (strlen(passphrase) > 63 || strlen(passphrase) < 8)) {
// fail passphrase to long or short!
return false;
}
[stuff deleted]
if(!passphrase || strlen(passphrase) == 0) {
conf.authmode = AUTH_OPEN;
*conf.password = 0;
} else {
conf.authmode = AUTH_WPA2_PSK;
strcpy(reinterpret_cast<char*>(conf.password), passphrase);
}
I suggest to change line 96, to keep the old behaviour:
if(*passphrase != 0 && passphrase && (strlen(passphrase) > 63 || strlen(passphrase) < 8)) {
Otherwise, if the new behaviour is desired strlen(passphrase) == 0 on line 109 could be removed.
Metadata
Metadata
Assignees
Labels
No labels