From b605dd257984d3384c680de2cf64e44bfd3484ca Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Wed, 13 Jan 2021 22:31:48 -0800 Subject: disable insecure endpoints --- lib/send.js | 1 + routes/assets.js | 2 ++ routes/send.js | 1 + routes/swaps.js | 1 + 4 files changed, 5 insertions(+) diff --git a/lib/send.js b/lib/send.js index b4fc9ac9..733c3cfb 100644 --- a/lib/send.js +++ b/lib/send.js @@ -1,6 +1,7 @@ const bolt11 = require("bolt11"); send = async (amount, memo, hash, user) => { + return res.status(500).send("Internal payments are temporarily disabled"); let payreq = bolt11.decode(hash); if (!amount) amount = payreq.satoshis; diff --git a/routes/assets.js b/routes/assets.js index c36f6d69..ea3e82ff 100644 --- a/routes/assets.js +++ b/routes/assets.js @@ -286,6 +286,8 @@ app.post( "/loadFaucet", auth, ah(async (req, res) => { + return res.status(500).send("Faucet feature temporarily disabled"); + const { user } = req; const { asset, amount } = req.body; amount = parseInt(amount); diff --git a/routes/send.js b/routes/send.js index c7c3c30f..8a183183 100644 --- a/routes/send.js +++ b/routes/send.js @@ -2,6 +2,7 @@ const axios = require("axios"); const uuidv4 = require("uuid/v4"); module.exports = ah(async (req, res, next) => { + return res.status(500).send("Internal payments are temporarily disabled"); let { amount, asset, memo, username } = req.body; let { user } = req; amount = parseInt(amount); diff --git a/routes/swaps.js b/routes/swaps.js index b4d75b60..7311629c 100644 --- a/routes/swaps.js +++ b/routes/swaps.js @@ -450,6 +450,7 @@ app.post( "/orders", auth, ah(async (req, res) => { + return res.status(500).send("Trading temporarily disabled"); const { user } = req; try { await swap(user, req.body); -- cgit v1.2.3