-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AP/WIFI check password validity for encryption type #792
Changes from all commits
9b80539
ec1da0a
3910809
405acec
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1065,6 +1065,104 @@ exports['controller.closeTesselConnections'] = { | |
test.done(); | ||
}); | ||
}, | ||
|
||
invalidAccessPointWEPPasswordCharacters: function(test) { | ||
test.expect(1); | ||
|
||
controller.createAccessPoint({ | ||
ssid: 'test', | ||
password: 'nothexdigits', | ||
security: 'wep' | ||
}) | ||
.catch(error => { | ||
test.ok(error); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For the error tests, I would copy this pattern already used -> https://github.com/tessel/t2-cli/pull/792/files#diff-579f2a5c7de143123729e47453faf76bR1064
|
||
test.done(); | ||
}); | ||
}, | ||
|
||
invalidAccessPointWEPPasswordLength: function(test) { | ||
test.expect(1); | ||
|
||
controller.createAccessPoint({ | ||
ssid: 'test', | ||
password: '0123456789ABCDEF', | ||
security: 'wep' | ||
}) | ||
.catch(error => { | ||
test.ok(error); | ||
test.done(); | ||
}); | ||
}, | ||
|
||
invalidAccessPointPSKPasswordCharacters: function(test) { | ||
test.expect(1); | ||
|
||
controller.createAccessPoint({ | ||
ssid: 'test', | ||
password: 'Password™', | ||
security: 'psk' | ||
}) | ||
.catch(error => { | ||
test.ok(error); | ||
test.done(); | ||
}); | ||
}, | ||
|
||
invalidAccessPointPSKASCIIPasswordTooShort: function(test) { | ||
test.expect(1); | ||
|
||
controller.createAccessPoint({ | ||
ssid: 'test', | ||
password: 'short', | ||
security: 'psk' | ||
}) | ||
.catch(error => { | ||
test.ok(error); | ||
test.done(); | ||
}); | ||
}, | ||
|
||
invalidAccessPointPSKASCIIPasswordTooLong: function(test) { | ||
test.expect(1); | ||
|
||
controller.createAccessPoint({ | ||
ssid: 'test', | ||
password: 'this is a very long passphrase. in fact, it is over 63 characters, which makes it invalid.', | ||
security: 'psk' | ||
}) | ||
.catch(error => { | ||
test.ok(error); | ||
test.done(); | ||
}); | ||
}, | ||
|
||
invalidAccessPointPSKHexPasswordTooShort: function(test) { | ||
test.expect(1); | ||
|
||
controller.createAccessPoint({ | ||
ssid: 'test', | ||
password: 'DEAD', | ||
security: 'psk' | ||
}) | ||
.catch(error => { | ||
test.ok(error); | ||
test.done(); | ||
}); | ||
}, | ||
|
||
invalidAccessPointPSKHexPasswordTooLong: function(test) { | ||
test.expect(1); | ||
|
||
controller.createAccessPoint({ | ||
ssid: 'test', | ||
password: 'DEADDEADDEADDEADDEADDEADDEADDEADDEADDEADDEADDEADDEADDEADDEADDEADDEAD', | ||
security: 'psk' | ||
}) | ||
.catch(error => { | ||
test.ok(error); | ||
test.done(); | ||
}); | ||
}, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Great tests! |
||
}; | ||
|
||
exports['controller.root'] = { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not going to block on this, but it would be awesome if the comments for each set of criteria included links to canonical "sources of truth".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. This can be added before merging. 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Specifically, I'd like to see links to the published protocols, in which things like
if (length !== 10 || length !== 26 || length !== 58) {
are clearly defined. Thanks!!