2
0
mirror of https://github.com/Ride-The-Lightning/RTL synced 2024-11-03 23:15:24 +00:00

Merge branch 'master' into UX

This commit is contained in:
Shahana Farooqui 2019-10-12 18:38:06 -04:00
commit 17c3d1ade1
2 changed files with 10 additions and 8 deletions

View File

@ -7,6 +7,7 @@ var upperCase = require('upper-case');
var crypto = require('crypto');
var hash = crypto.createHash('sha256');
var logger = require('./logger');
var rpcPass = '';
exports.authenticateUser = (req, res, next) => {
if(+common.rtl_sso) {
@ -72,13 +73,14 @@ exports.authenticateUser = (req, res, next) => {
});
} else {
const jsonLNDConfig = ini.parse(data);
var rpcPass = '';
if (undefined !== jsonLNDConfig.Bitcoind && undefined !== jsonLNDConfig.Bitcoind['bitcoind.rpcpass']) {
rpcPass = jsonLNDConfig.Bitcoind['bitcoind.rpcpass'];
} else if (undefined !== jsonLNDConfig['bitcoind.rpcpass']) {
rpcPass = jsonLNDConfig['bitcoind.rpcpass'];
if (rpcPass === '') {
if (undefined !== jsonLNDConfig.Bitcoind && undefined !== jsonLNDConfig.Bitcoind['bitcoind.rpcpass']) {
rpcPass = jsonLNDConfig.Bitcoind['bitcoind.rpcpass'];
} else if (undefined !== jsonLNDConfig['bitcoind.rpcpass']) {
rpcPass = jsonLNDConfig['bitcoind.rpcpass'];
}
rpcPass = hash.update(rpcPass).digest('hex');
}
rpcPass = hash.update(rpcPass).digest('hex');
if (rpcPass === password) {
var rpcUser = (undefined !== jsonLNDConfig.Bitcoind && undefined !== jsonLNDConfig.Bitcoind['bitcoind.rpcuser']) ? jsonLNDConfig.Bitcoind['bitcoind.rpcuser'] : '';
rpcUser = (rpcUser === '' && undefined !== jsonLNDConfig['bitcoind.rpcuser']) ? jsonLNDConfig['bitcoind.rpcuser'] : '';

View File

@ -41,7 +41,7 @@
- [ ] DescribeGraph
- [x] GetChanInfo
- [x] GetNodeInfo
- [ ] QueryRoutes
- [x] QueryRoutes
- [x] GetNetworkInfo
- [ ] StopDaemon
- [ ] SubscribeChannelGraph
@ -52,6 +52,6 @@
- [x] ExportChannelBackup
- [x] ExportAllChannelBackups
- [x] VerifyChanBackup
- [ ] RestoreChannelBackups
- [x] RestoreChannelBackups
- [ ] SubscribeChannelBackups
- [ ] Messages