harden server further against bad channel ids
parent
06c971ec47
commit
a28a59abf0
4
rpc.js
4
rpc.js
|
@ -28,8 +28,8 @@ var WARN = function (e, output) {
|
|||
};
|
||||
|
||||
var isValidId = function (chan) {
|
||||
return chan && chan.length && /^[a-fA-F0-9]/.test(chan) ||
|
||||
[32, 48].indexOf(chan.length) !== -1;
|
||||
return chan && chan.length && /^[a-fA-F0-9]/.test(chan) &&
|
||||
[32, 48].indexOf(chan.length) > -1;
|
||||
};
|
||||
|
||||
var uint8ArrayToHex = function (a) {
|
||||
|
|
Loading…
Reference in New Issue