Skip to content

Commit

Permalink
Merge pull request #118 from prey/1.3.9-rc
Browse files Browse the repository at this point in the history
1.3.9 rc
  • Loading branch information
mauricioschneider committed Apr 7, 2015
2 parents 23736b6 + 6338bd6 commit a1a362d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions lib/agent/actions/alert/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ exports.start = function(opts, cb) {
emitter = null;
}

// remove newlines so the message can be completely displayed
message = message.replace(/(\r\n|\n|\r)/gm," ");

args.push(message);
system.spawn_as_logged_user(bin, args, function(err, alert) {
if (err) return done(err);
Expand Down
2 changes: 1 addition & 1 deletion lib/agent/providers/network/linux.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ exports.parse_access_points_list = function(output) {
return;

var obj = {
ssid: parsed['ESSID'].slice(1, -1).replace(/[^\w :'-]/, ''), // remove "" and weird chars,
ssid: parsed['ESSID'].slice(1, -1).replace(/[^\w :'-]/g, ''), // remove "" and weird chars,
mac_address: parsed['Address'],
security: parsed['Encryption key'] == 'on'
}
Expand Down
2 changes: 1 addition & 1 deletion lib/agent/providers/network/mac.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ exports.parse_access_points_list = function(stdout) {
var sec = end[1] && end[1].trim();

var ap = {
ssid : start[0].trim().replace(/[^\w :'-]/, ''), // remove weird chars
ssid : start[0].trim().replace(/[^\w :'-]/g, ''), // remove weird chars
mac_address : line.match(mac_address_regex)[0],
signal_strength : parseInt(data[1]), // use positive integers
channel : parseInt(data[2]),
Expand Down
2 changes: 1 addition & 1 deletion lib/agent/providers/network/windows.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ exports.parse_access_points_list_autowc = function(out) {

return arr.map(function(o) {
return {
ssid : o.ssid.replace(/[^\w :'-]/, ''),
ssid : o.ssid.replace(/[^\w :'-]/g, ''),
// security : null, // don't have this data
// quality : null,
signal_strength : o.signal_strength,
Expand Down

0 comments on commit a1a362d

Please sign in to comment.