repo: resdb action: commit revision: path_from: revision_from: 73af7f181868260ccf5c36081170c9f400ae010b: path_to: revision_to:
commit 73af7f181868260ccf5c36081170c9f400ae010b Author: d3v1150m471cDate: Sun Jul 10 19:01:26 2011 -0500 peer2anonet: made security enhancements for input data diff --git a/contrib/peer2anonet/README b/contrib/peer2anonet/README
--- a/contrib/peer2anonet/README +++ b/contrib/peer2anonet/README @@ -74,7 +74,11 @@ anon <--your peer's alias 1230 <--you new asn 3570 <--your peer's asn 3c6e0b8a9c15224a8228b9a98ca1531d <--your peer's public key -================== Not Actual Line on File ============================ +================== Not Actual Line on File ============================ + + At your discretion, you may exclude the public key from the + bottom of an autoconfig file and post installation of your new + peer service, peer2anonet will prompt for it. CHANGES: diff --git a/contrib/peer2anonet/peer2anonet b/contrib/peer2anonet/peer2anonet
--- a/contrib/peer2anonet/peer2anonet
+++ b/contrib/peer2anonet/peer2anonet
@@ -40,7 +40,7 @@ read -p "Enter your peer asn: " PEERASN
# Do some security checks on variables:
TEST[0]=$PEERNAME; TEST[1]=$YOURNET; TEST[2]=$YOURROUTE; TEST[3]=$YOURIP
TEST[4]=$REMOTEIP; TEST[5]=$PEERIP; TEST[6]=$YOURPORT; TEST[7]=$PEERPORT
- TEST[8]=$YOURASN; TEST[9]=$PEERASN; TEST[10]=$PUBKEY
+ TEST[8]=$YOURASN; TEST[9]=$PEERASN;
for((X=0;X<=5;X++)); do
if [[ $(echo ${TEST[$X]} | tr -d 'a-zA-Z0-9._-' | wc -c) -gt 1 ]]; then
@@ -53,7 +53,7 @@ done
for((X=6;X<=9;X++)); do
if [[ $(echo ${TEST[$X]} | tr -d '0-9' | wc -c) -gt 1 ]]; then
- echo "peer2anonet: fatal error: unacceptable data:$X ${TEST[$X]}
+ echo "peer2anonet: fatal error: unacceptable data: ${TEST[$X]}
"
exit 1
fi
@@ -159,7 +159,13 @@ ln -s /services/"$PEERNAME" /service/
echo "peer2anonet: New peering session configured
"
read -p "Enter your peer's public key: " PUBKEY
+if [[ $(echo "$PUBKEY" | tr -d 'a-zA-Z0-9' | wc -c) -gt 1 ]]; then
+ echo "peer2anonet: fatal error: unacceptable data: $PUBKEY
+"
+ exit 1
+fi
echo "$PUBKEY" > /services/"$PEERNAME"/pubkey
+
exit 0
-----END OF PAGE-----