Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chris2286266 security patch #12

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ Make your life easy for the next step by running these on the node's server:
cat ~/.multichain/chain1/multichain.conf
grep rpc-port ~/.multichain/chain1/params.dat

In the web demo directory, copy the `config-example.txt` file to `config.txt`:
In the web demo directory, copy the `config-example.php` file to `config.php`:

cp config-example.txt config.txt
cp config-example.php config.php

In the demo website directory, enter chain details in `config.txt` e.g.:

Expand All @@ -99,8 +99,6 @@ Multiple chains are supported by the web demo by copying the same section again
another.rpchost=...
...

**Note that the `config.txt` file is readable by users of your web demo installation, and contains your MultiChain API password, so you should never use this basic setup for a production system.**


Launch the Web Demo
-------------------
Expand Down
18 changes: 18 additions & 0 deletions config-example.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php
exit();
/*
# Define your MultiChain node credentials below.

default.name=Default # name to display in the web interface
default.rpchost=127.0.0.1 # IP address of MultiChain node
default.rpcport=12345 # see rpc-port from chain parameters
default.rpcuser=multichainrpc # username for RPC from multichain.conf
default.rpcpassword= # password for RPC from multichain.conf

# You can configure support for other nodes using a word other than 'default':
#
# another.name=...
# another.rpchost=...
# ...etc...
*/
?>
13 changes: 0 additions & 13 deletions config-example.txt

This file was deleted.

4 changes: 2 additions & 2 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ function read_config()
{
$config=array();

$contents=file_get_contents('config.txt');
$contents=file_get_contents('config.php');
$lines=explode("\n", $contents);

foreach ($lines as $line) {
Expand Down Expand Up @@ -233,4 +233,4 @@ function string_to_fileref($string)
'mimetype' => $parts[3],
'filesize' => $parts[4],
);
}
}