Skip to content

Commit f3e6bf1

Browse files
Travis Personalanshaw
Travis Person
authored andcommitted
fix: config.set rejects buffer values (ipfs-inactive#800)
License: MIT Signed-off-by: Travis Person <[email protected]>
1 parent 7b33529 commit f3e6bf1

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/config/set.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@ module.exports = (send) => {
1212
return callback(new Error('Invalid key type'))
1313
}
1414

15-
if (typeof value !== 'object' &&
16-
typeof value !== 'boolean' &&
17-
typeof value !== 'string') {
15+
if (value === undefined || Buffer.isBuffer(value)) {
1816
return callback(new Error('Invalid value type'))
1917
}
2018

0 commit comments

Comments
 (0)