@@ -31,9 +31,13 @@ exports.validateArg = function validateArg (args, config) {
3131 }
3232 if ( ! err && key === 'key' ) {
3333 for ( var vKey in value ) {
34+ if ( ! value . hasOwnProperty ( vKey ) ) continue ;
3435 var vValue = value [ vKey ] ;
3536 var result = validateKeySize ( config , vKey , vValue ) ;
3637 if ( result . err ) {
38+ if ( result . err === 'function' ) {
39+ continue ;
40+ }
3741 err = result . err ;
3842 } else {
3943 args . command = args . command . replace ( vValue , result [ 'value' ] ) ;
@@ -87,6 +91,10 @@ exports.validateArg = function validateArg (args, config) {
8791} ;
8892
8993var validateKeySize = function validateKeySize ( config , key , value ) {
94+ if ( typeof value === 'function' ) {
95+ return { err : 'function' } ;
96+ }
97+
9098 if ( value . length > config . maxKeySize ) {
9199 if ( config . keyCompression ) {
92100 return { err : false , value : createHash ( 'md5' ) . update ( value ) . digest ( 'hex' ) } ;
@@ -111,6 +119,7 @@ exports.fuse = function fuse (target, handlers) {
111119// merges a object's proppertys / values with a other object
112120exports . merge = function merge ( target , obj ) {
113121 for ( var i in obj ) {
122+ if ( ! obj . hasOwnProperty ( i ) ) continue ;
114123 target [ i ] = obj [ i ] ;
115124 }
116125
0 commit comments