Skip to content
Permalink
Browse files

Fix security vuln in web3js 0.20.6 (INFURA#10)

  • Loading branch information...
egalano committed Jun 4, 2019
1 parent a144bc5 commit 94919e8584f34ad70fc322ae0dc259bdf2c2fddb
Showing with 1,170 additions and 514 deletions.
  1. +4 −2 index.js
  2. +1,151 −497 package-lock.json
  3. +15 −15 package.json
@@ -6,13 +6,15 @@ const devp2p = require('ethereumjs-devp2p')
const geoip = require('geoip-lite')
const debug = require('debug')('infura:main')
const Web3 = require('web3')
const web3 = new Web3()
// https://github.com/ethereum/web3.js/issues/2786
const web3 = new Web3('http://')
const _ = require('lodash')
const db = require('./lib/db')()
const Common = require('ethereumjs-common')
const c = new Common('mainnet')
const web3Url = process.env.PROVIDER || `https://mainnet.infura.io/v3/${process.env.INFURA_ID}`
web3.setProvider(new Web3.providers.HttpProvider(web3Url))
const ethProvider = new Web3.providers.HttpProvider(web3Url)
web3.setProvider(ethProvider)

const { EthPeer, PeerErr } = db

0 comments on commit 94919e8

Please sign in to comment.
You can’t perform that action at this time.