← Back to team overview

linuxdcpp-team team mailing list archive

[Branch ~dcplusplus-team/dcplusplus/trunk] Rev 3362: Increased maximum command length to 512 KiB and added an option in the UI

 

------------------------------------------------------------
revno: 3362
committer: Fredrik Ullner <ullner@xxxxxxxxx>
branch nick: dcplusplus
timestamp: Sun 2013-11-10 22:06:28 +0100
message:
  Increased maximum command length to 512 KiB and added an option in the UI
modified:
  changelog.txt
  dcpp/SettingsManager.cpp
  help/settings_expert.html
  win32/ExpertsPage.cpp


--
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-11-10 19:24:06 +0000
+++ changelog.txt	2013-11-10 21:06:28 +0000
@@ -1,6 +1,7 @@
 * [L#1249810] Fix NMDC TTH search responses (emtee)
 * [ADC] Don't disconnect CCPM conns after 3 minutes of inactivity (poy)
 * [L#1115765] Added ability to filter out files and directories from the share (ullner)
+* [L#1246868] Increased maximum command length to 512 KiB and added an option in the UI (ullner)
 
 -- 0.830 2013-09-22 --
 * [L#1010996] Correct search responses (maksis, poy)

=== modified file 'dcpp/SettingsManager.cpp'
--- dcpp/SettingsManager.cpp	2013-11-01 18:38:32 +0000
+++ dcpp/SettingsManager.cpp	2013-11-10 21:06:28 +0000
@@ -302,7 +302,7 @@
 	setDefault(AUTO_KICK_NO_FAVS, false);
 	setDefault(PROMPT_PASSWORD, false);
 	setDefault(DONT_DL_ALREADY_QUEUED, false);
-	setDefault(MAX_COMMAND_LENGTH, 16*1024);
+	setDefault(MAX_COMMAND_LENGTH, 512*1024);
 	setDefault(ALLOW_UNTRUSTED_HUBS, true);
 	setDefault(ALLOW_UNTRUSTED_CLIENTS, true);
 	setDefault(SORT_FAVUSERS_FIRST, false);
@@ -521,6 +521,10 @@
 			unset(TOOLBAR);
 		}
 
+		if(v <= 0.830) {
+			unset(MAX_COMMAND_LENGTH);
+		}
+
 		if(SETTING(SET_MINISLOT_SIZE) < 512)
 			set(SET_MINISLOT_SIZE, 512);
 		if(SETTING(AUTODROP_INTERVAL) < 1)

=== modified file 'help/settings_expert.html'
--- help/settings_expert.html	2013-09-22 13:53:01 +0000
+++ help/settings_expert.html	2013-11-10 21:06:28 +0000
@@ -55,6 +55,9 @@
   shown in its originating <placeholder><a href="window_hub.html">Hub</a></placeholder> window
   instead.
   </dd>
+  <dt id="maxcommandlength">Max protocol command length</dt>
+  <dd cshelp="IDH_SETTINGS_EXPERT_MAX_COMMAND_LENGTH">The amount of protocol data DC++ will maximally manage. This setting help protect against potentially malicious clients and hubs.
+  Measured in bytes. (default: 524288 bytes)</dd>
 </dl>
 </body>
 </html>

=== modified file 'win32/ExpertsPage.cpp'
--- win32/ExpertsPage.cpp	2013-08-08 21:26:09 +0000
+++ win32/ExpertsPage.cpp	2013-11-10 21:06:28 +0000
@@ -33,7 +33,7 @@
 using dwt::Label;
 
 ExpertsPage::ExpertsPage(dwt::Widget* parent) :
-PropPage(parent, 6, 2)
+PropPage(parent, 7, 2)
 {
 	setHelpId(IDH_EXPERTSPAGE);
 
@@ -52,6 +52,7 @@
 	addItem(T_("Socket read buffer"), SettingsManager::SOCKET_IN_BUFFER, true, IDH_SETTINGS_EXPERT_SOCKET_IN_BUFFER, T_("B"));
 	addItem(T_("Socket write buffer"), SettingsManager::SOCKET_OUT_BUFFER, true, IDH_SETTINGS_EXPERT_SOCKET_OUT_BUFFER, T_("B"));
 	addItem(T_("Max PM windows"), SettingsManager::MAX_PM_WINDOWS, true, IDH_SETTINGS_EXPERT_MAX_PM_WINDOWS);
+	addItem(T_("Max protocol command length"), SettingsManager::MAX_COMMAND_LENGTH, true, IDH_SETTINGS_EXPERT_MAX_COMMAND_LENGTH, T_("B"));
 
 	PropPage::read(items);
 }