Skip to content

Commit ccd0dea

Browse files
jmstriegelCoder daemon
authored and
Coder daemon
committed
wpa passwords require 8 characters minimum. wpa_supplicant crashes hard if this is not met
1 parent ec7a164 commit ccd0dea

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

coder-base/apps/auth/meta.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"created": "2013-03-05",
3-
"modified": "2013-07-17",
3+
"modified": "2013-08-18",
44
"color": "#1abc9c",
55
"author": "Jason Striegel",
66
"name": "Auth",

coder-base/apps/wifi/app.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,13 @@ exports.api_wifi_configure_handler = function( req, res ) {
6767
});
6868
}
6969

70+
if ( type !== 'OPEN' && type != 'WEP' && password.length < 8 ) {
71+
res.json({
72+
'status': 'error',
73+
'error': 'short password'
74+
});
75+
}
76+
7077
if ( type !== 'WPAPSK' && type != 'WEP' && type != 'OPEN' ) {
7178
res.json({
7279
'status': 'error',

coder-base/static/apps/wifi/js/index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,11 @@ var saveClick = function() {
183183
} else if ( $selected.attr('data-nettype') !== "OPEN"
184184
&& pass === "" ) {
185185
$form.find('.pass').addClass('error');
186-
}
186+
} else if ( $selected.attr('data-nettype') !== "OPEN"
187+
&& $selected.attr('data-nettype') !== "WEP"
188+
&& pass.length < 8 ) {
189+
$form.find('.pass').addClass('error');
190+
}
187191
return;
188192
}
189193

0 commit comments

Comments
 (0)