From cac23a5a0b7dc993ea1fb1513159db0af994d0ff Mon Sep 17 00:00:00 2001 From: Gregory Maxwell Date: Sun, 5 Feb 2012 02:30:43 -0500 Subject: Have bitcoind recommend a secure RPC password. Increase invalid password delay. Help users avoid insecure configurations a bit by recommending a secure RPC password and increasing the incorrect password delay. This may open up a RPC DOS for users with exposed RPC ports and short passwords. Since users shouldn't have exposed RPC ports OR short passwords, the DOS risk is preferable to the compromise risk. Also logs the client IP address for incorrect attempts. --- src/rpc.cpp | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/src/rpc.cpp b/src/rpc.cpp index a936edbbe4..a703334d6b 100644 --- a/src/rpc.cpp +++ b/src/rpc.cpp @@ -2008,16 +2008,23 @@ void ThreadRPCServer2(void* parg) if (mapArgs["-rpcuser"] == "" && mapArgs["-rpcpassword"] == "") { + unsigned char rand_pwd[32]; + RAND_bytes(rand_pwd, 32); string strWhatAmI = "To use bitcoind"; if (mapArgs.count("-server")) strWhatAmI = strprintf(_("To use the %s option"), "\"-server\""); else if (mapArgs.count("-daemon")) strWhatAmI = strprintf(_("To use the %s option"), "\"-daemon\""); PrintConsole( - _("Warning: %s, you must set rpcpassword=\nin the configuration file: %s\n" + _("Warning: %s, you must set a rpcpassword in the configuration file:\n %s\n" + "It is recommended you use the following random password:\n" + "rpcuser=bitcoinrpc\n" + "rpcpassword=%s\n" + "(you do not need to remember this password)\n" "If the file does not exist, create it with owner-readable-only file permissions.\n"), strWhatAmI.c_str(), - GetConfigFile().c_str()); + GetConfigFile().c_str(), + EncodeBase58(&rand_pwd[0],&rand_pwd[0]+32).c_str()); CreateThread(Shutdown, NULL); return; } @@ -2104,12 +2111,14 @@ void ThreadRPCServer2(void* parg) } if (!HTTPAuthorized(mapHeaders)) { - // Deter brute-forcing short passwords - if (mapArgs["-rpcpassword"].size() < 15) - Sleep(50); + printf("ThreadRPCServer incorrect password attempt from %s\n",peer.address().to_string().c_str()); + /* Deter brute-forcing short passwords. + If this results in a DOS the user really + shouldn't have their RPC port exposed.*/ + if (mapArgs["-rpcpassword"].size() < 20) + Sleep(250); stream << HTTPReply(401, "") << std::flush; - printf("ThreadRPCServer incorrect password attempt\n"); continue; } -- cgit v1.2.3 From 4664aae3fe2eba4eec84d20f1e7e701ceeeb49bd Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Tue, 7 Feb 2012 22:30:21 -0500 Subject: Update copyrights to 2012 for files modified this year --- COPYING | 2 +- doc/README | 2 +- doc/README_windows.txt | 2 +- src/checkpoints.cpp | 2 +- src/db.cpp | 2 +- src/headers.h | 2 +- src/init.cpp | 2 +- src/irc.cpp | 2 +- src/key.h | 2 +- src/main.cpp | 2 +- src/main.h | 2 +- src/net.cpp | 2 +- src/net.h | 2 +- src/rpc.cpp | 2 +- src/serialize.h | 2 +- src/util.cpp | 2 +- src/util.h | 2 +- src/wallet.h | 2 +- 18 files changed, 18 insertions(+), 18 deletions(-) diff --git a/COPYING b/COPYING index ab042014e8..0f9223ba6b 100644 --- a/COPYING +++ b/COPYING @@ -1,4 +1,4 @@ -Copyright (c) 2009-2011 Bitcoin Developers +Copyright (c) 2009-2012 Bitcoin Developers Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/doc/README b/doc/README index 40bda47d9c..197f03dd56 100644 --- a/doc/README +++ b/doc/README @@ -1,6 +1,6 @@ Bitcoin 0.4.4 BETA -Copyright (c) 2009-2011 Bitcoin Developers +Copyright (c) 2009-2012 Bitcoin Developers Distributed under the MIT/X11 software license, see the accompanying file license.txt or http://www.opensource.org/licenses/mit-license.php. This product includes software developed by the OpenSSL Project for use in diff --git a/doc/README_windows.txt b/doc/README_windows.txt index f8f1c34188..ad357130c2 100644 --- a/doc/README_windows.txt +++ b/doc/README_windows.txt @@ -1,6 +1,6 @@ Bitcoin 0.4.4 BETA -Copyright (c) 2009-2011 Bitcoin Developers +Copyright (c) 2009-2012 Bitcoin Developers Distributed under the MIT/X11 software license, see the accompanying file license.txt or http://www.opensource.org/licenses/mit-license.php. This product includes software developed by the OpenSSL Project for use in diff --git a/src/checkpoints.cpp b/src/checkpoints.cpp index 508f72b376..f78712ef4b 100644 --- a/src/checkpoints.cpp +++ b/src/checkpoints.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Bitcoin developers +// Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file license.txt or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/db.cpp b/src/db.cpp index 600afe383d..783b079963 100644 --- a/src/db.cpp +++ b/src/db.cpp @@ -1,5 +1,5 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto -// Copyright (c) 2011 The Bitcoin developers +// Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file license.txt or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/headers.h b/src/headers.h index 96db87db1b..88a16d96d7 100644 --- a/src/headers.h +++ b/src/headers.h @@ -1,5 +1,5 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto -// Copyright (c) 2011 The Bitcoin developers +// Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file license.txt or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/init.cpp b/src/init.cpp index 12e890cbb4..079e67b936 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -1,5 +1,5 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto -// Copyright (c) 2011 The Bitcoin developers +// Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file license.txt or http://www.opensource.org/licenses/mit-license.php. #include "headers.h" diff --git a/src/irc.cpp b/src/irc.cpp index fe96a90a1c..b632b96546 100644 --- a/src/irc.cpp +++ b/src/irc.cpp @@ -1,5 +1,5 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto -// Copyright (c) 2011 The Bitcoin developers +// Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file license.txt or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/key.h b/src/key.h index 0d0b6d8bb4..8b033a029f 100644 --- a/src/key.h +++ b/src/key.h @@ -1,5 +1,5 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto -// Copyright (c) 2011 The Bitcoin developers +// Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file license.txt or http://www.opensource.org/licenses/mit-license.php. #ifndef BITCOIN_KEY_H diff --git a/src/main.cpp b/src/main.cpp index dc8503d38f..9f12829042 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,5 +1,5 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto -// Copyright (c) 2011 The Bitcoin developers +// Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file license.txt or http://www.opensource.org/licenses/mit-license.php. #include "headers.h" diff --git a/src/main.h b/src/main.h index 8a8b3870ec..25cf079013 100644 --- a/src/main.h +++ b/src/main.h @@ -1,5 +1,5 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto -// Copyright (c) 2011 The Bitcoin developers +// Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file license.txt or http://www.opensource.org/licenses/mit-license.php. #ifndef BITCOIN_MAIN_H diff --git a/src/net.cpp b/src/net.cpp index f995ea9c2a..764246520b 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -1,5 +1,5 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto -// Copyright (c) 2011 The Bitcoin developers +// Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file license.txt or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/net.h b/src/net.h index 03d514ca90..52df06f1be 100644 --- a/src/net.h +++ b/src/net.h @@ -1,5 +1,5 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto -// Copyright (c) 2011 The Bitcoin developers +// Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file license.txt or http://www.opensource.org/licenses/mit-license.php. #ifndef BITCOIN_NET_H diff --git a/src/rpc.cpp b/src/rpc.cpp index a703334d6b..a67f7fc947 100644 --- a/src/rpc.cpp +++ b/src/rpc.cpp @@ -1,5 +1,5 @@ // Copyright (c) 2010 Satoshi Nakamoto -// Copyright (c) 2011 The Bitcoin developers +// Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file license.txt or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/serialize.h b/src/serialize.h index 385c9ab8e9..2bc3a071d7 100644 --- a/src/serialize.h +++ b/src/serialize.h @@ -1,5 +1,5 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto -// Copyright (c) 2011 The Bitcoin developers +// Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file license.txt or http://www.opensource.org/licenses/mit-license.php. #ifndef BITCOIN_SERIALIZE_H diff --git a/src/util.cpp b/src/util.cpp index a3f1c9507d..85ca02f0aa 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -1,5 +1,5 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto -// Copyright (c) 2011 The Bitcoin developers +// Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file license.txt or http://www.opensource.org/licenses/mit-license.php. #include "headers.h" diff --git a/src/util.h b/src/util.h index 9f9001e06e..a48979c0ef 100644 --- a/src/util.h +++ b/src/util.h @@ -1,5 +1,5 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto -// Copyright (c) 2011 The Bitcoin developers +// Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file license.txt or http://www.opensource.org/licenses/mit-license.php. #ifndef BITCOIN_UTIL_H diff --git a/src/wallet.h b/src/wallet.h index 3560a72580..4387e1a01f 100644 --- a/src/wallet.h +++ b/src/wallet.h @@ -1,5 +1,5 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto -// Copyright (c) 2011 The Bitcoin developers +// Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file license.txt or http://www.opensource.org/licenses/mit-license.php. #ifndef BITCOIN_WALLET_H -- cgit v1.2.3 From ccd69c7d2219a4a72ad1b6ea01838c3388130ea7 Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Tue, 7 Feb 2012 18:20:01 -0500 Subject: Bugfix: Capitalize kB correctly (upstream: 9d4b05c) --- src/init.cpp | 2 +- src/qt/bitcoinstrings.cpp | 2 +- src/qt/locale/bitcoin_da.ts | 12 ++++++------ src/qt/locale/bitcoin_de.ts | 12 ++++++------ src/qt/locale/bitcoin_en.ts | 6 +++--- src/qt/locale/bitcoin_es.ts | 12 ++++++------ src/qt/locale/bitcoin_es_CL.ts | 12 ++++++------ src/qt/locale/bitcoin_nb.ts | 12 ++++++------ src/qt/locale/bitcoin_nl.ts | 12 ++++++------ src/qt/locale/bitcoin_ru.ts | 12 ++++++------ src/qt/locale/bitcoin_zh_TW.ts | 12 ++++++------ src/qt/optionsdialog.cpp | 4 ++-- 12 files changed, 55 insertions(+), 55 deletions(-) diff --git a/src/init.cpp b/src/init.cpp index f8a63d26de..e158e15da4 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -204,7 +204,7 @@ bool AppInit2(int argc, char* argv[]) " -upnp \t " + _("Attempt to use UPnP to map the listening port\n") + #endif #endif - " -paytxfee= \t " + _("Fee per KB to add to transactions you send\n") + + " -paytxfee= \t " + _("Fee per kB to add to transactions you send\n") + #ifdef GUI " -server \t\t " + _("Accept command line and JSON-RPC commands\n") + #endif diff --git a/src/qt/bitcoinstrings.cpp b/src/qt/bitcoinstrings.cpp index 647adb9c53..1b0a6767d7 100644 --- a/src/qt/bitcoinstrings.cpp +++ b/src/qt/bitcoinstrings.cpp @@ -24,7 +24,7 @@ QT_TRANSLATE_NOOP("bitcoin-core", "" "86400)\n"), QT_TRANSLATE_NOOP("bitcoin-core", "Don't attempt to use UPnP to map the listening port\n"), QT_TRANSLATE_NOOP("bitcoin-core", "Attempt to use UPnP to map the listening port\n"), -QT_TRANSLATE_NOOP("bitcoin-core", "Fee per KB to add to transactions you send\n"), +QT_TRANSLATE_NOOP("bitcoin-core", "Fee per kB to add to transactions you send\n"), QT_TRANSLATE_NOOP("bitcoin-core", "Accept command line and JSON-RPC commands\n"), QT_TRANSLATE_NOOP("bitcoin-core", "Run in the background as a daemon and accept commands\n"), QT_TRANSLATE_NOOP("bitcoin-core", "Use the test network\n"), diff --git a/src/qt/locale/bitcoin_da.ts b/src/qt/locale/bitcoin_da.ts index b6c148f05a..ae1c84a447 100644 --- a/src/qt/locale/bitcoin_da.ts +++ b/src/qt/locale/bitcoin_da.ts @@ -674,8 +674,8 @@ Adresse: %4 - Optional transaction fee per KB that helps make sure your transactions are processed quickly. Most transactions are 1KB. Fee 0.01 recommended. - Valgfri transaktionsgebyr pr. KB, der hjælper dine transaktioner med at blive behandlet hurtigt. De fleste transaktioner er på 1KB. Gebyr på 0.01 anbefales. + Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1kB. Fee 0.01 recommended. + Valgfri transaktionsgebyr pr. kB, der hjælper dine transaktioner med at blive behandlet hurtigt. De fleste transaktioner er på 1kB. Gebyr på 0.01 anbefales. @@ -684,8 +684,8 @@ Adresse: %4 - Optional transaction fee per KB that helps make sure your transactions are processed quickly. Most transactions are 1KB. Fee 0.01 recommended. - Valgfri transaktionsgebyr pr. KB, der hjælper dine transaktioner med at blive behandlet hurtigt. De fleste transaktioner er på 1KB. Gebyr på 0.01 anbefales. + Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1kB. Fee 0.01 recommended. + Valgfri transaktionsgebyr pr. kB, der hjælper dine transaktioner med at blive behandlet hurtigt. De fleste transaktioner er på 1kB. Gebyr på 0.01 anbefales. @@ -1523,9 +1523,9 @@ p, li { white-space: pre-wrap; } - Fee per KB to add to transactions you send + Fee per kB to add to transactions you send - Gebyr pr. KB, som skal tilføjes til transaktioner du sender + Gebyr pr. kB, som skal tilføjes til transaktioner du sender diff --git a/src/qt/locale/bitcoin_de.ts b/src/qt/locale/bitcoin_de.ts index 27db47528c..242343b1e1 100644 --- a/src/qt/locale/bitcoin_de.ts +++ b/src/qt/locale/bitcoin_de.ts @@ -673,8 +673,8 @@ Adresse: %4 - Optional transaction fee per KB that helps make sure your transactions are processed quickly. Most transactions are 1KB. Fee 0.01 recommended. - Zusätzliche Transaktionsgebühr pro KB, welche sicherstellt, dass Ihre Transaktionen schnell bearbeitet werden. Die meisten Transaktionen sind 1 KB groß. Eine Gebühr von 0.01 wird empfohlen. + Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1kB. Fee 0.01 recommended. + Zusätzliche Transaktionsgebühr pro kB, welche sicherstellt, dass Ihre Transaktionen schnell bearbeitet werden. Die meisten Transaktionen sind 1 kB groß. Eine Gebühr von 0.01 wird empfohlen. @@ -683,8 +683,8 @@ Adresse: %4 - Optional transaction fee per KB that helps make sure your transactions are processed quickly. Most transactions are 1KB. Fee 0.01 recommended. - Zusätzliche Transaktionsgebühr pro KB, welche sicherstellt, dass Ihre Transaktionen schnell bearbeitet werden. Die meisten Transaktionen sind 1 KB groß. Eine Gebühr von 0.01 wird empfohlen. + Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1kB. Fee 0.01 recommended. + Zusätzliche Transaktionsgebühr pro kB, welche sicherstellt, dass Ihre Transaktionen schnell bearbeitet werden. Die meisten Transaktionen sind 1 kB groß. Eine Gebühr von 0.01 wird empfohlen. @@ -1512,9 +1512,9 @@ p, li { white-space: pre-wrap; } - Fee per KB to add to transactions you send + Fee per kB to add to transactions you send - Gebühr pro KB, die gesendeten Transaktionen hinzugefügt wird + Gebühr pro kB, die gesendeten Transaktionen hinzugefügt wird diff --git a/src/qt/locale/bitcoin_en.ts b/src/qt/locale/bitcoin_en.ts index 0d57d9b154..122f6d56a5 100644 --- a/src/qt/locale/bitcoin_en.ts +++ b/src/qt/locale/bitcoin_en.ts @@ -680,7 +680,7 @@ Address: %4 - Optional transaction fee per KB that helps make sure your transactions are processed quickly. Most transactions are 1KB. Fee 0.01 recommended. + Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1kB. Fee 0.01 recommended. @@ -690,7 +690,7 @@ Address: %4 - Optional transaction fee per KB that helps make sure your transactions are processed quickly. Most transactions are 1KB. Fee 0.01 recommended. + Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1kB. Fee 0.01 recommended. @@ -1515,7 +1515,7 @@ p, li { white-space: pre-wrap; } - Fee per KB to add to transactions you send + Fee per kB to add to transactions you send diff --git a/src/qt/locale/bitcoin_es.ts b/src/qt/locale/bitcoin_es.ts index 8c6966bfad..815ba80ab6 100644 --- a/src/qt/locale/bitcoin_es.ts +++ b/src/qt/locale/bitcoin_es.ts @@ -693,8 +693,8 @@ Dirección: %4 - Optional transaction fee per KB that helps make sure your transactions are processed quickly. Most transactions are 1KB. Fee 0.01 recommended. - Comisión opcional a las transacciones por KB que ayuda a asegurar que tus transacciones son procesadas rápidamente. La mayoría de las transacciones son de 1KB. Se recomienda una comisión de 0.01. + Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1kB. Fee 0.01 recommended. + Comisión opcional a las transacciones por kB que ayuda a asegurar que tus transacciones son procesadas rápidamente. La mayoría de las transacciones son de 1kB. Se recomienda una comisión de 0.01. @@ -703,8 +703,8 @@ Dirección: %4 - Optional transaction fee per KB that helps make sure your transactions are processed quickly. Most transactions are 1KB. Fee 0.01 recommended. - Comisión opcional a las transacciones por KB que ayuda a asegurar que tus transacciones son procesadas rápidamente. La mayoría de las transacciones son de 1KB. Se recomienda una comisión de 0.01. + Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1kB. Fee 0.01 recommended. + Comisión opcional a las transacciones por kB que ayuda a asegurar que tus transacciones son procesadas rápidamente. La mayoría de las transacciones son de 1kB. Se recomienda una comisión de 0.01. @@ -1550,9 +1550,9 @@ p, li { white-space: pre-wrap; } - Fee per KB to add to transactions you send + Fee per kB to add to transactions you send - Comisión por KB para agregar a las transacciones que envias + Comisión por kB para agregar a las transacciones que envias diff --git a/src/qt/locale/bitcoin_es_CL.ts b/src/qt/locale/bitcoin_es_CL.ts index 107b90bb55..80df5ba450 100644 --- a/src/qt/locale/bitcoin_es_CL.ts +++ b/src/qt/locale/bitcoin_es_CL.ts @@ -693,8 +693,8 @@ Dirección: %4 - Optional transaction fee per KB that helps make sure your transactions are processed quickly. Most transactions are 1KB. Fee 0.01 recommended. - Comisión de operación opcional por KB que ayuda a asegurar que tus transacciones sean procesadas rápidamente. La mayoría de las transacciones son de 1KB. Se recomienda una comisión de 0.01. + Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1kB. Fee 0.01 recommended. + Comisión de operación opcional por kB que ayuda a asegurar que tus transacciones sean procesadas rápidamente. La mayoría de las transacciones son de 1kB. Se recomienda una comisión de 0.01. @@ -703,8 +703,8 @@ Dirección: %4 - Optional transaction fee per KB that helps make sure your transactions are processed quickly. Most transactions are 1KB. Fee 0.01 recommended. - Comisión de operación opcional por KB que ayuda a asegurar que tus transacciones sean procesadas rápidamente. La mayoría de las transacciones son de 1KB. Se recomienda una comisión de 0.01. + Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1kB. Fee 0.01 recommended. + Comisión de operación opcional por kB que ayuda a asegurar que tus transacciones sean procesadas rápidamente. La mayoría de las transacciones son de 1kB. Se recomienda una comisión de 0.01. @@ -1550,9 +1550,9 @@ p, li { white-space: pre-wrap; } - Fee per KB to add to transactions you send + Fee per kB to add to transactions you send - Comisión por KB para agregar a las transacciones que envias + Comisión por kB para agregar a las transacciones que envias diff --git a/src/qt/locale/bitcoin_nb.ts b/src/qt/locale/bitcoin_nb.ts index ef09e6baf7..9166af300f 100644 --- a/src/qt/locale/bitcoin_nb.ts +++ b/src/qt/locale/bitcoin_nb.ts @@ -674,8 +674,8 @@ Adresse: %4 - Optional transaction fee per KB that helps make sure your transactions are processed quickly. Most transactions are 1KB. Fee 0.01 recommended. - Valgfritt transaksjonsgebyr per KB som hjelper for å sikre at transaksjonene dine blir raskt prosessert. De fleste transaksjoner er 1KB. Et gebyr på 0.01 anbefales. + Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1kB. Fee 0.01 recommended. + Valgfritt transaksjonsgebyr per kB som hjelper for å sikre at transaksjonene dine blir raskt prosessert. De fleste transaksjoner er 1kB. Et gebyr på 0.01 anbefales. @@ -684,8 +684,8 @@ Adresse: %4 - Optional transaction fee per KB that helps make sure your transactions are processed quickly. Most transactions are 1KB. Fee 0.01 recommended. - Valgfritt transaksjonsgebyr per KB som hjelper for å sikre at transaksjonene dine blir raskt prosessert. De fleste transaksjoner er 1KB. Et gebyr på 0.01 anbefales. + Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1kB. Fee 0.01 recommended. + Valgfritt transaksjonsgebyr per kB som hjelper for å sikre at transaksjonene dine blir raskt prosessert. De fleste transaksjoner er 1kB. Et gebyr på 0.01 anbefales. @@ -1524,9 +1524,9 @@ p, li { white-space: pre-wrap; } - Fee per KB to add to transactions you send + Fee per kB to add to transactions you send - Gebyr per KB som skal legges til transaksjoner du sender + Gebyr per kB som skal legges til transaksjoner du sender diff --git a/src/qt/locale/bitcoin_nl.ts b/src/qt/locale/bitcoin_nl.ts index 2b36237d2e..4a28cac21d 100644 --- a/src/qt/locale/bitcoin_nl.ts +++ b/src/qt/locale/bitcoin_nl.ts @@ -675,8 +675,8 @@ Adres: %4 - Optional transaction fee per KB that helps make sure your transactions are processed quickly. Most transactions are 1KB. Fee 0.01 recommended. - Optionele transactiekosten per KB die helpen ervoor te zorgen dat uw transacties snel verwerkt worden. De meeste transacties zijn 1KB. Transactiekosten van 0.01 wordt aangeraden. + Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1kB. Fee 0.01 recommended. + Optionele transactiekosten per kB die helpen ervoor te zorgen dat uw transacties snel verwerkt worden. De meeste transacties zijn 1kB. Transactiekosten van 0.01 wordt aangeraden. @@ -685,8 +685,8 @@ Adres: %4 - Optional transaction fee per KB that helps make sure your transactions are processed quickly. Most transactions are 1KB. Fee 0.01 recommended. - Optionele transactiekosten per KB die helpen ervoor te zorgen dat uw transacties snel verwerkt worden. De meeste transacties zijn 1KB. Transactiekosten van 0.01 wordt aangeraden. + Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1kB. Fee 0.01 recommended. + Optionele transactiekosten per kB die helpen ervoor te zorgen dat uw transacties snel verwerkt worden. De meeste transacties zijn 1kB. Transactiekosten van 0.01 wordt aangeraden. @@ -1526,9 +1526,9 @@ p, li { white-space: pre-wrap; } - Fee per KB to add to transactions you send + Fee per kB to add to transactions you send - Kosten per KB om aan transacties toe te voegen die u verstuurt + Kosten per kB om aan transacties toe te voegen die u verstuurt diff --git a/src/qt/locale/bitcoin_ru.ts b/src/qt/locale/bitcoin_ru.ts index 8bce04ed97..648caabcc3 100644 --- a/src/qt/locale/bitcoin_ru.ts +++ b/src/qt/locale/bitcoin_ru.ts @@ -669,8 +669,8 @@ Address: %4 - Optional transaction fee per KB that helps make sure your transactions are processed quickly. Most transactions are 1KB. Fee 0.01 recommended. - Опциональная комиссия за кадый KB транзакции, которое позволяет быть уверенным, что Ваша транзакция будет обработана быстро. Большинство транщакций занимают 1 KB. Рекомендованная комиссия: 0.01 BTC. + Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1kB. Fee 0.01 recommended. + Опциональная комиссия за кадый kB транзакции, которое позволяет быть уверенным, что Ваша транзакция будет обработана быстро. Большинство транщакций занимают 1 kB. Рекомендованная комиссия: 0.01 BTC. @@ -679,8 +679,8 @@ Address: %4 - Optional transaction fee per KB that helps make sure your transactions are processed quickly. Most transactions are 1KB. Fee 0.01 recommended. - Опциональная комиссия за кадый KB транзакции, которая позволяет быть уверенным, что Ваша транзакция будет обработана быстро. Большинство транзакций занимают 1 KB. Рекомендованная комиссия: 0.01 BTC. + Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1kB. Fee 0.01 recommended. + Опциональная комиссия за кадый kB транзакции, которая позволяет быть уверенным, что Ваша транзакция будет обработана быстро. Большинство транзакций занимают 1 kB. Рекомендованная комиссия: 0.01 BTC. @@ -1519,9 +1519,9 @@ p, li { white-space: pre-wrap; } - Fee per KB to add to transactions you send + Fee per kB to add to transactions you send - Комиссия (за каждый KB транзакции) + Комиссия (за каждый kB транзакции) diff --git a/src/qt/locale/bitcoin_zh_TW.ts b/src/qt/locale/bitcoin_zh_TW.ts index b0c4bd12d8..562ddb3230 100644 --- a/src/qt/locale/bitcoin_zh_TW.ts +++ b/src/qt/locale/bitcoin_zh_TW.ts @@ -673,8 +673,8 @@ Address: %4 - Optional transaction fee per KB that helps make sure your transactions are processed quickly. Most transactions are 1KB. Fee 0.01 recommended. - 非必要的交易手續費, 有助於縮短你的交易處理時間. 以 KB 為計費單位, 而大部份交易的大小是 1KB. 建議設定為 0.01 位元幣. + Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1kB. Fee 0.01 recommended. + 非必要的交易手續費, 有助於縮短你的交易處理時間. 以 kB 為計費單位, 而大部份交易的大小是 1kB. 建議設定為 0.01 位元幣. @@ -683,8 +683,8 @@ Address: %4 - Optional transaction fee per KB that helps make sure your transactions are processed quickly. Most transactions are 1KB. Fee 0.01 recommended. - 非必要的交易手續費, 有助於縮短你的交易處理時間. 以 KB 為計費單位, 而大部份交易的大小是 1KB. 建議設定為 0.01 位元幣. + Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1kB. Fee 0.01 recommended. + 非必要的交易手續費, 有助於縮短你的交易處理時間. 以 kB 為計費單位, 而大部份交易的大小是 1kB. 建議設定為 0.01 位元幣. @@ -1524,9 +1524,9 @@ p, li { white-space: pre-wrap; } - Fee per KB to add to transactions you send + Fee per kB to add to transactions you send - 交易付款時每 KB 的交易手續費 + 交易付款時每 kB 的交易手續費 diff --git a/src/qt/optionsdialog.cpp b/src/qt/optionsdialog.cpp index ea3164e3d7..75fd4ccf18 100644 --- a/src/qt/optionsdialog.cpp +++ b/src/qt/optionsdialog.cpp @@ -214,7 +214,7 @@ MainOptionsPage::MainOptionsPage(QWidget *parent): proxy_hbox->addStretch(1); layout->addLayout(proxy_hbox); - QLabel *fee_help = new QLabel(tr("Optional transaction fee per KB that helps make sure your transactions are processed quickly. Most transactions are 1KB. Fee 0.01 recommended.")); + QLabel *fee_help = new QLabel(tr("Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. Fee 0.01 recommended.")); fee_help->setWordWrap(true); layout->addWidget(fee_help); @@ -223,7 +223,7 @@ MainOptionsPage::MainOptionsPage(QWidget *parent): QLabel *fee_label = new QLabel(tr("Pay transaction &fee")); fee_hbox->addWidget(fee_label); fee_edit = new BitcoinAmountField(); - fee_edit->setToolTip(tr("Optional transaction fee per KB that helps make sure your transactions are processed quickly. Most transactions are 1KB. Fee 0.01 recommended.")); + fee_edit->setToolTip(tr("Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. Fee 0.01 recommended.")); fee_label->setBuddy(fee_edit); fee_hbox->addWidget(fee_edit); -- cgit v1.2.3 From e7c3e6e4b4bbfaf6772f0c8bd6b4278d0120e6e4 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Sun, 5 Feb 2012 11:53:52 +0100 Subject: Restructure credit transaction decomposition (solves issue #689) When a transaction has multiple outputs that go to the wallet, list these as multiple transactions in the UI. This is also applied to generated (coinbase) transactions. Also makes the code shorter and easier to understand. --- src/qt/transactionrecord.cpp | 60 +++++++++++++++++--------------------------- 1 file changed, 23 insertions(+), 37 deletions(-) diff --git a/src/qt/transactionrecord.cpp b/src/qt/transactionrecord.cpp index 52a3080e97..4059207b96 100644 --- a/src/qt/transactionrecord.cpp +++ b/src/qt/transactionrecord.cpp @@ -47,49 +47,35 @@ QList TransactionRecord::decomposeTransaction(const CWallet * // // Credit // - TransactionRecord sub(hash, nTime); - - sub.credit = nNet; - - if (wtx.IsCoinBase()) - { - // Generated - sub.type = TransactionRecord::Generated; - - if (nCredit == 0) - { - int64 nUnmatured = 0; - BOOST_FOREACH(const CTxOut& txout, wtx.vout) - nUnmatured += wallet->GetCredit(txout); - sub.credit = nUnmatured; - } - } - else + BOOST_FOREACH(const CTxOut& txout, wtx.vout) { - bool foundAddress = false; - // Received by Bitcoin Address - BOOST_FOREACH(const CTxOut& txout, wtx.vout) + if(wallet->IsMine(txout)) { - if(wallet->IsMine(txout)) + TransactionRecord sub(hash, nTime); + CBitcoinAddress address; + sub.idx = parts.size(); // sequence number + sub.credit = txout.nValue; + if (wtx.IsCoinBase()) { - CBitcoinAddress address; - if (ExtractAddress(txout.scriptPubKey, wallet, address)) - { - sub.type = TransactionRecord::RecvWithAddress; - sub.address = address.ToString(); - foundAddress = true; - break; - } + // Generated + sub.type = TransactionRecord::Generated; } - } - if(!foundAddress) - { - // Received by IP connection, or other non-address transaction like OP_EVAL - sub.type = TransactionRecord::RecvFromOther; - sub.address = mapValue["from"]; + else if (ExtractAddress(txout.scriptPubKey, wallet, address)) + { + // Received by Bitcoin Address + sub.type = TransactionRecord::RecvWithAddress; + sub.address = address.ToString(); + } + else + { + // Received by IP connection (deprecated features), or a multisignature or other non-simple transaction + sub.type = TransactionRecord::RecvFromOther; + sub.address = mapValue["from"]; + } + + parts.append(sub); } } - parts.append(sub); } else { -- cgit v1.2.3 From da6a3919a96b6070a1facc8ae8c8946bd74838e1 Mon Sep 17 00:00:00 2001 From: Gregory Maxwell Date: Sun, 5 Feb 2012 02:30:43 -0500 Subject: Have bitcoind recommend a secure RPC password. Increase invalid password delay. Help users avoid insecure configurations a bit by recommending a secure RPC password and increasing the incorrect password delay. This may open up a RPC DOS for users with exposed RPC ports and short passwords. Since users shouldn't have exposed RPC ports OR short passwords, the DOS risk is preferable to the compromise risk. Also logs the client IP address for incorrect attempts. --- src/bitcoinrpc.cpp | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/src/bitcoinrpc.cpp b/src/bitcoinrpc.cpp index 4031d0cbc3..821574a2ff 100644 --- a/src/bitcoinrpc.cpp +++ b/src/bitcoinrpc.cpp @@ -2161,16 +2161,23 @@ void ThreadRPCServer2(void* parg) if (mapArgs["-rpcuser"] == "" && mapArgs["-rpcpassword"] == "") { + unsigned char rand_pwd[32]; + RAND_bytes(rand_pwd, 32); string strWhatAmI = "To use bitcoind"; if (mapArgs.count("-server")) strWhatAmI = strprintf(_("To use the %s option"), "\"-server\""); else if (mapArgs.count("-daemon")) strWhatAmI = strprintf(_("To use the %s option"), "\"-daemon\""); PrintConsole( - _("Error: %s, you must set rpcpassword=\nin the configuration file: %s\n" + _("Error: %s, you must set a rpcpassword in the configuration file:\n %s\n" + "It is recommended you use the following random password:\n" + "rpcuser=bitcoinrpc\n" + "rpcpassword=%s\n" + "(you do not need to remember this password)\n" "If the file does not exist, create it with owner-readable-only file permissions.\n"), strWhatAmI.c_str(), - GetConfigFile().c_str()); + GetConfigFile().c_str(), + EncodeBase58(&rand_pwd[0],&rand_pwd[0]+32).c_str()); #ifndef QT_GUI CreateThread(Shutdown, NULL); #endif @@ -2259,12 +2266,14 @@ void ThreadRPCServer2(void* parg) } if (!HTTPAuthorized(mapHeaders)) { - // Deter brute-forcing short passwords - if (mapArgs["-rpcpassword"].size() < 15) - Sleep(50); + printf("ThreadRPCServer incorrect password attempt from %s\n",peer.address().to_string().c_str()); + /* Deter brute-forcing short passwords. + If this results in a DOS the user really + shouldn't have their RPC port exposed.*/ + if (mapArgs["-rpcpassword"].size() < 20) + Sleep(250); stream << HTTPReply(401, "") << std::flush; - printf("ThreadRPCServer incorrect password attempt\n"); continue; } -- cgit v1.2.3 From 4bbd72cca108042cdffee74d10fcc7a540da2b51 Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Tue, 7 Feb 2012 22:30:21 -0500 Subject: Update copyrights to 2012 for files modified this year --- COPYING | 2 +- src/bitcoinrpc.cpp | 2 +- src/db.cpp | 2 +- src/init.cpp | 2 +- src/key.h | 2 +- src/main.cpp | 2 +- src/main.h | 2 +- src/net.cpp | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/COPYING b/COPYING index ab042014e8..0f9223ba6b 100644 --- a/COPYING +++ b/COPYING @@ -1,4 +1,4 @@ -Copyright (c) 2009-2011 Bitcoin Developers +Copyright (c) 2009-2012 Bitcoin Developers Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/bitcoinrpc.cpp b/src/bitcoinrpc.cpp index 821574a2ff..b1d8514649 100644 --- a/src/bitcoinrpc.cpp +++ b/src/bitcoinrpc.cpp @@ -1,5 +1,5 @@ // Copyright (c) 2010 Satoshi Nakamoto -// Copyright (c) 2011 The Bitcoin developers +// Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file license.txt or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/db.cpp b/src/db.cpp index c2d18279da..e681d98f1a 100644 --- a/src/db.cpp +++ b/src/db.cpp @@ -1,5 +1,5 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto -// Copyright (c) 2011 The Bitcoin developers +// Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file license.txt or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/init.cpp b/src/init.cpp index e158e15da4..3ca0dcf251 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -1,5 +1,5 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto -// Copyright (c) 2011 The Bitcoin developers +// Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file license.txt or http://www.opensource.org/licenses/mit-license.php. #include "headers.h" diff --git a/src/key.h b/src/key.h index 010591632e..6da0dc288d 100644 --- a/src/key.h +++ b/src/key.h @@ -1,5 +1,5 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto -// Copyright (c) 2011 The Bitcoin developers +// Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file license.txt or http://www.opensource.org/licenses/mit-license.php. #ifndef BITCOIN_KEY_H diff --git a/src/main.cpp b/src/main.cpp index 07b07447c1..1f8abc04a2 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,5 +1,5 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto -// Copyright (c) 2011 The Bitcoin developers +// Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file license.txt or http://www.opensource.org/licenses/mit-license.php. #include "headers.h" diff --git a/src/main.h b/src/main.h index 47394ff8e9..4232d2a0f7 100644 --- a/src/main.h +++ b/src/main.h @@ -1,5 +1,5 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto -// Copyright (c) 2011 The Bitcoin developers +// Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file license.txt or http://www.opensource.org/licenses/mit-license.php. #ifndef BITCOIN_MAIN_H diff --git a/src/net.cpp b/src/net.cpp index 7b92e874ac..ad7007d1c2 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -1,5 +1,5 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto -// Copyright (c) 2011 The Bitcoin developers +// Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file license.txt or http://www.opensource.org/licenses/mit-license.php. -- cgit v1.2.3