This repository was archived by the owner on Mar 10, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +13
-4
lines changed Expand file tree Collapse file tree 4 files changed +13
-4
lines changed Original file line number Diff line number Diff line change 8686 "eslint-plugin-react" : " ^7.11.1" ,
8787 "go-ipfs-dep" : " ~0.4.18" ,
8888 "gulp" : " ^3.9.1" ,
89- "interface-ipfs-core" : " ~0.92 .0" ,
89+ "interface-ipfs-core" : " ~0.93 .0" ,
9090 "ipfsd-ctl" : " ~0.40.0" ,
9191 "nock" : " ^10.0.2" ,
9292 "pull-stream" : " ^3.6.9" ,
Original file line number Diff line number Diff line change 33const moduleConfig = require ( '../utils/module-config' )
44const pull = require ( 'pull-stream' )
55const deferred = require ( 'pull-defer' )
6+ const IsIpfs = require ( 'is-ipfs' )
67const cleanCID = require ( '../utils/clean-cid' )
78
89module . exports = ( arg ) => {
@@ -17,7 +18,9 @@ module.exports = (arg) => {
1718 try {
1819 args = cleanCID ( args )
1920 } catch ( err ) {
20- return callback ( err )
21+ if ( ! IsIpfs . ipfsPath ( args ) ) {
22+ return callback ( err )
23+ }
2124 }
2225
2326 const p = deferred . source ( )
Original file line number Diff line number Diff line change 22
33const moduleConfig = require ( '../utils/module-config' )
44const Stream = require ( 'readable-stream' )
5+ const IsIpfs = require ( 'is-ipfs' )
56const cleanCID = require ( '../utils/clean-cid' )
67
78module . exports = ( arg ) => {
@@ -16,7 +17,9 @@ module.exports = (arg) => {
1617 try {
1718 args = cleanCID ( args )
1819 } catch ( err ) {
19- return callback ( err )
20+ if ( ! IsIpfs . ipfsPath ( args ) ) {
21+ return callback ( err )
22+ }
2023 }
2124
2225 const pt = new Stream . PassThrough ( { objectMode : true } )
Original file line number Diff line number Diff line change 11'use strict'
22
33const promisify = require ( 'promisify-es6' )
4+ const IsIpfs = require ( 'is-ipfs' )
45const moduleConfig = require ( '../utils/module-config' )
56const cleanCID = require ( '../utils/clean-cid' )
67
@@ -16,7 +17,9 @@ module.exports = (arg) => {
1617 try {
1718 args = cleanCID ( args )
1819 } catch ( err ) {
19- return callback ( err )
20+ if ( ! IsIpfs . ipfsPath ( args ) ) {
21+ return callback ( err )
22+ }
2023 }
2124
2225 send ( {
You can’t perform that action at this time.
0 commit comments