mirror of
https://github.com/hyperledger/fabric-samples.git
synced 2026-06-22 09:35:10 +00:00
Fixed information leak
Signed-off-by: Kurt Seifried <kurt@seifried.org> Signed-off-by: Ry Jones <ry@linux.com>
This commit is contained in:
parent
c5e190680f
commit
9f7a5e8d99
2 changed files with 9 additions and 7 deletions
|
|
@ -2,6 +2,7 @@
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
#
|
#
|
||||||
|
TMPFILE=`mktemp`
|
||||||
shopt -s extglob
|
shopt -s extglob
|
||||||
|
|
||||||
function _exit(){
|
function _exit(){
|
||||||
|
|
@ -19,7 +20,7 @@ DIR=${PWD}
|
||||||
|
|
||||||
# Locate the test network
|
# Locate the test network
|
||||||
cd "${DIR}/../../../test-network"
|
cd "${DIR}/../../../test-network"
|
||||||
env | sort > /tmp/env.orig
|
env | sort > $TMPFILE
|
||||||
|
|
||||||
OVERRIDE_ORG="1"
|
OVERRIDE_ORG="1"
|
||||||
. ./scripts/envVar.sh
|
. ./scripts/envVar.sh
|
||||||
|
|
@ -30,8 +31,8 @@ parsePeerConnectionParameters 1 2
|
||||||
export FABRIC_CFG_PATH="${DIR}/../../../config"
|
export FABRIC_CFG_PATH="${DIR}/../../../config"
|
||||||
export PATH="${DIR}/../../../bin:${PWD}:$PATH"
|
export PATH="${DIR}/../../../bin:${PWD}:$PATH"
|
||||||
|
|
||||||
env | sort | comm -1 -3 /tmp/env.orig - | sed -E 's/(.*)=(.*)/export \1="\2"/'
|
env | sort | comm -1 -3 $TMPFILE - | sed -E 's/(.*)=(.*)/export \1="\2"/'
|
||||||
|
|
||||||
rm /tmp/env.orig
|
rm $TMPFILE
|
||||||
|
|
||||||
cd "${DIR}"
|
cd "${DIR}"
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
TMPFILE=`mktemp`
|
||||||
shopt -s extglob
|
shopt -s extglob
|
||||||
|
|
||||||
function _exit(){
|
function _exit(){
|
||||||
|
|
@ -19,7 +20,7 @@ DIR=${PWD}
|
||||||
|
|
||||||
# Locate the test-network
|
# Locate the test-network
|
||||||
cd "${DIR}/../../../test-network"
|
cd "${DIR}/../../../test-network"
|
||||||
env | sort > /tmp/env.orig
|
env | sort > $TMPFILE
|
||||||
|
|
||||||
OVERRIDE_ORG="2"
|
OVERRIDE_ORG="2"
|
||||||
. ./scripts/envVar.sh
|
. ./scripts/envVar.sh
|
||||||
|
|
@ -31,7 +32,7 @@ parsePeerConnectionParameters 1 2
|
||||||
export FABRIC_CFG_PATH="${DIR}/../../../config"
|
export FABRIC_CFG_PATH="${DIR}/../../../config"
|
||||||
export PATH="${DIR}/../../../bin:${PWD}:$PATH"
|
export PATH="${DIR}/../../../bin:${PWD}:$PATH"
|
||||||
|
|
||||||
env | sort | comm -1 -3 /tmp/env.orig - | sed -E 's/(.*)=(.*)/export \1="\2"/'
|
env | sort | comm -1 -3 $TMPFILE - | sed -E 's/(.*)=(.*)/export \1="\2"/'
|
||||||
rm /tmp/env.orig
|
rm $TMPFILE
|
||||||
|
|
||||||
cd "${DIR}"
|
cd "${DIR}"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue