linuxdcpp-team team mailing list archive
-
linuxdcpp-team team
-
Mailing list archive
-
Message #07036
[Branch ~dcplusplus-team/dcplusplus/trunk] Rev 3313: [ADC] Disallow some malevolent messages
------------------------------------------------------------
revno: 3313
committer: poy <poy@xxxxxxxxxx>
branch nick: trunk
timestamp: Mon 2013-06-17 23:09:16 +0200
message:
[ADC] Disallow some malevolent messages
modified:
changelog.txt
dcpp/AdcHub.cpp
dcpp/version.h
win32/AboutDlg.cpp
win32/DCPlusPlus.rc
--
lp:dcplusplus
https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk
Your team Dcplusplus-team is subscribed to branch lp:dcplusplus.
To unsubscribe from this branch go to https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk/+edit-subscription
=== modified file 'changelog.txt'
--- changelog.txt 2013-06-17 20:17:48 +0000
+++ changelog.txt 2013-06-17 21:09:16 +0000
@@ -1,4 +1,6 @@
+-- 0.825 2013-06-18 --
* [L#1191099] Group partial file list uploads to avoid a crash (poy)
+* [L#1189975] [ADC] Disallow some malevolent messages (maksis)
-- 0.822 2013-06-03 --
* Improve plugin management
=== modified file 'dcpp/AdcHub.cpp'
--- dcpp/AdcHub.cpp 2013-01-29 15:38:58 +0000
+++ dcpp/AdcHub.cpp 2013-06-17 21:09:16 +0000
@@ -463,15 +463,19 @@
case AdcCommand::ERROR_BAD_PASSWORD:
{
- setPassword(Util::emptyString);
+ if(c.getType() == AdcCommand::TYPE_INFO) {
+ setPassword(Util::emptyString);
+ }
break;
}
case AdcCommand::ERROR_COMMAND_ACCESS:
{
- string tmp;
- if(c.getParam("FC", 1, tmp) && tmp.size() == 4)
- forbiddenCommands.insert(AdcCommand::toFourCC(tmp.c_str()));
+ if(c.getType() == AdcCommand::TYPE_INFO) {
+ string tmp;
+ if(c.getParam("FC", 1, tmp) && tmp.size() == 4)
+ forbiddenCommands.insert(AdcCommand::toFourCC(tmp.c_str()));
+ }
break;
}
@@ -633,19 +637,23 @@
}
void AdcHub::handle(AdcCommand::ZON, AdcCommand& c) noexcept {
- try {
+ if(c.getType() == AdcCommand::TYPE_INFO) {
+ try {
sock->setMode(BufferedSocket::MODE_ZPIPE);
} catch (const Exception& e) {
dcdebug("AdcHub::handleZON failed with error: %s\n", e.getError().c_str());
}
+ }
}
void AdcHub::handle(AdcCommand::ZOF, AdcCommand& c) noexcept {
- try {
+ if(c.getType() == AdcCommand::TYPE_INFO) {
+ try {
sock->setMode(BufferedSocket::MODE_LINE);
} catch (const Exception& e) {
dcdebug("AdcHub::handleZOF failed with error: %s\n", e.getError().c_str());
}
+ }
}
void AdcHub::connect(const OnlineUser& user, const string& token) {
=== modified file 'dcpp/version.h'
--- dcpp/version.h 2013-06-03 12:25:54 +0000
+++ dcpp/version.h 2013-06-17 21:09:16 +0000
@@ -21,8 +21,8 @@
#define APPNAME "DC++"
// don't forget to update the .rc file as well!
-#define VERSIONSTRING "0.822"
-#define VERSIONFLOAT 0.822
+#define VERSIONSTRING "0.825"
+#define VERSIONFLOAT 0.825
namespace dcpp {
extern const std::string fullVersionString;
=== modified file 'win32/AboutDlg.cpp'
--- win32/AboutDlg.cpp 2013-04-23 17:57:04 +0000
+++ win32/AboutDlg.cpp 2013-06-17 21:09:16 +0000
@@ -60,7 +60,7 @@
"steven sheehy, tobias nygren, dorian, stephan hohe, mafa_45, mikael eman, james ross, "
"stanislav maslovski, david grundberg, pavel andreev, yakov suraev, kulmegil, smir, emtee, individ, "
"pseudonym, crise, ben, ximin luo, razzloss, andrew browne, darkklor, vasily.n, netcelli, "
-"gennady proskurin, iceman50, flow84, alexander sashnov, yorhel, irainman. Keep it coming!";
+"gennady proskurin, iceman50, flow84, alexander sashnov, yorhel, irainman, maksis. Keep it coming!";
AboutDlg::AboutDlg(dwt::Widget* parent) :
dwt::ModalDialog(parent),
=== modified file 'win32/DCPlusPlus.rc'
--- win32/DCPlusPlus.rc 2013-06-03 12:25:54 +0000
+++ win32/DCPlusPlus.rc 2013-06-17 21:09:16 +0000
@@ -100,8 +100,8 @@
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 0,8,2,2
- PRODUCTVERSION 0,8,2,2
+ FILEVERSION 0,8,2,5
+ PRODUCTVERSION 0,8,2,5
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@@ -118,12 +118,12 @@
BEGIN
VALUE "Comments", "http://dcplusplus.sourceforge.net"
VALUE "FileDescription", "DC++"
- VALUE "FileVersion", "0, 8, 2, 2"
+ VALUE "FileVersion", "0, 8, 2, 5"
VALUE "InternalName", "DC++"
VALUE "LegalCopyright", "Copyright 2001-2013 Jacek Sieka"
VALUE "OriginalFilename", "DCPlusPlus.exe"
VALUE "ProductName", "DC++"
- VALUE "ProductVersion", "0, 8, 2, 2"
+ VALUE "ProductVersion", "0, 8, 2, 5"
END
END
BLOCK "VarFileInfo"