tessel / t2-cli

Tessel 2 Command Line Interface
MIT License
114 stars 56 forks source link

AP/WIFI check password validity for encryption type #760

Closed johnnyman727 closed 8 years ago

johnnyman727 commented 8 years ago

OpenWRT will silently fail if you try to set the password on an access point (or wifi connection but that's less of an issue) to something that is not valid for the encryption type. For example, I tried to create an access point with the encryption type of psk2 and the password of stones but that password was not long enough to be valid. The CLI reported that it was set correctly but the network was never created.

Ideally, we should be able to check for password-encryption validity before we attempt to set it in OpenWRT. The CLI should WARN the user if it is invalid and abort.

HipsterBrown commented 8 years ago

This is a great addition @johnnyman727. I have also been looking into this OpenWRT recipe to fallback to ap/wifi only, if one of those configs fail -> https://forum.openwrt.org/viewtopic.php?pid=309131#p309131

There is another method of doing that through Step 3 of this OpenWRT recipe -> http://wiki.openwrt.org/doc/recipes/ap_sta

HipsterBrown commented 8 years ago

For anyone who wants to claim this issue:

You can find out more about the password validation for the various security options, check out:

Feel free to ping me for review or questions.

smilin-desperado commented 8 years ago

Just saw this on @yourfirstpr. I'd love to give it a try

HipsterBrown commented 8 years ago

@smilin-desperado Awesome, it's all yours! Let me know if you need any help or review along the way. You can join the Slack team here -> https://tessel-slack.herokuapp.com/ or just mention me in a comment in this issue. :)

smilin-desperado commented 8 years ago

@HipsterBrown Been too busy to work on this recently and I'm not sure when I will have more time so I will have to 'unclaim' the issue so someone else can have a go at it.

HipsterBrown commented 8 years ago

@smilin-desperado Thanks for giving it a shot anyway and letting me know about unclaiming it. Please reach out if you ever want to contribute again in the future. :smile:

laiedwin commented 8 years ago

I'd love to take a stab at this!

HipsterBrown commented 8 years ago

@laiedwin Awesome, thanks! It's all yours! Feel free to reach out if you have any questions or want me to review.

laiedwin commented 8 years ago

Hi @HipsterBrown , I've opened PR #792 for this.

Few things I'm not entirely sure about:

Feel free to let me know if there's any changes I should make!

HipsterBrown commented 8 years ago

@laiedwin Ok I'll review that today and add feedback to that PR.