mirror of
https://github.com/rejetto/hfs2.git
synced 2025-12-19 10:03:56 +01:00
limit URL parameters to 1000 characters
This commit is contained in:
parent
bb1e2fa782
commit
b8ebfc4e22
65
main.dfm
65
main.dfm
@ -2,8 +2,8 @@ object mainFrm: TmainFrm
|
|||||||
Left = 293
|
Left = 293
|
||||||
Top = 219
|
Top = 219
|
||||||
Caption = 'HFS ~ HTTP File Server'
|
Caption = 'HFS ~ HTTP File Server'
|
||||||
ClientHeight = 391
|
ClientHeight = 483
|
||||||
ClientWidth = 913
|
ClientWidth = 879
|
||||||
Color = clBtnFace
|
Color = clBtnFace
|
||||||
Constraints.MinHeight = 260
|
Constraints.MinHeight = 260
|
||||||
Constraints.MinWidth = 390
|
Constraints.MinWidth = 390
|
||||||
@ -27,7 +27,7 @@ object mainFrm: TmainFrm
|
|||||||
object graphSplitter: TSplitter
|
object graphSplitter: TSplitter
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 78
|
Top = 78
|
||||||
Width = 913
|
Width = 879
|
||||||
Height = 5
|
Height = 5
|
||||||
Cursor = crVSplit
|
Cursor = crVSplit
|
||||||
Align = alTop
|
Align = alTop
|
||||||
@ -42,7 +42,7 @@ object mainFrm: TmainFrm
|
|||||||
object graphBox: TPaintBox
|
object graphBox: TPaintBox
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 48
|
Top = 48
|
||||||
Width = 913
|
Width = 879
|
||||||
Height = 30
|
Height = 30
|
||||||
Hint = 'Pink = Out'#13#10'Yellow = In'
|
Hint = 'Pink = Out'#13#10'Yellow = In'
|
||||||
Align = alTop
|
Align = alTop
|
||||||
@ -62,7 +62,7 @@ object mainFrm: TmainFrm
|
|||||||
object topToolbar: TToolBar
|
object topToolbar: TToolBar
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 913
|
Width = 879
|
||||||
Height = 24
|
Height = 24
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
ButtonWidth = 150
|
ButtonWidth = 150
|
||||||
@ -78,6 +78,7 @@ object mainFrm: TmainFrm
|
|||||||
ParentFont = False
|
ParentFont = False
|
||||||
ShowCaptions = True
|
ShowCaptions = True
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
|
ExplicitWidth = 976
|
||||||
object menuBtn: TToolButton
|
object menuBtn: TToolButton
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 0
|
Top = 0
|
||||||
@ -173,7 +174,7 @@ object mainFrm: TmainFrm
|
|||||||
object urlToolbar: TToolBar
|
object urlToolbar: TToolBar
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 24
|
Top = 24
|
||||||
Width = 913
|
Width = 879
|
||||||
Height = 24
|
Height = 24
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
ButtonWidth = 122
|
ButtonWidth = 122
|
||||||
@ -189,6 +190,7 @@ object mainFrm: TmainFrm
|
|||||||
ShowCaptions = True
|
ShowCaptions = True
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
Wrapable = False
|
Wrapable = False
|
||||||
|
ExplicitWidth = 976
|
||||||
object browseBtn: TToolButton
|
object browseBtn: TToolButton
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 0
|
Top = 0
|
||||||
@ -217,8 +219,8 @@ object mainFrm: TmainFrm
|
|||||||
object centralPnl: TPanel
|
object centralPnl: TPanel
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 83
|
Top = 83
|
||||||
Width = 913
|
Width = 879
|
||||||
Height = 308
|
Height = 400
|
||||||
Align = alClient
|
Align = alClient
|
||||||
BevelOuter = bvNone
|
BevelOuter = bvNone
|
||||||
Font.Charset = DEFAULT_CHARSET
|
Font.Charset = DEFAULT_CHARSET
|
||||||
@ -228,10 +230,11 @@ object mainFrm: TmainFrm
|
|||||||
Font.Style = []
|
Font.Style = []
|
||||||
ParentFont = False
|
ParentFont = False
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
|
ExplicitWidth = 976
|
||||||
object splitV: TSplitter
|
object splitV: TSplitter
|
||||||
Left = 313
|
Left = 313
|
||||||
Top = 0
|
Top = 0
|
||||||
Height = 197
|
Height = 289
|
||||||
Beveled = True
|
Beveled = True
|
||||||
Constraints.MaxWidth = 3
|
Constraints.MaxWidth = 3
|
||||||
Constraints.MinWidth = 3
|
Constraints.MinWidth = 3
|
||||||
@ -241,8 +244,8 @@ object mainFrm: TmainFrm
|
|||||||
end
|
end
|
||||||
object splitH: TSplitter
|
object splitH: TSplitter
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 197
|
Top = 289
|
||||||
Width = 913
|
Width = 879
|
||||||
Height = 5
|
Height = 5
|
||||||
Cursor = crVSplit
|
Cursor = crVSplit
|
||||||
Align = alBottom
|
Align = alBottom
|
||||||
@ -256,16 +259,17 @@ object mainFrm: TmainFrm
|
|||||||
object logPnl: TPanel
|
object logPnl: TPanel
|
||||||
Left = 316
|
Left = 316
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 597
|
Width = 563
|
||||||
Height = 197
|
Height = 289
|
||||||
Align = alClient
|
Align = alClient
|
||||||
BevelOuter = bvNone
|
BevelOuter = bvNone
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
|
ExplicitWidth = 660
|
||||||
object logBox: TRichEdit
|
object logBox: TRichEdit
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 23
|
Top = 23
|
||||||
Width = 597
|
Width = 563
|
||||||
Height = 174
|
Height = 266
|
||||||
Align = alClient
|
Align = alClient
|
||||||
Font.Charset = ANSI_CHARSET
|
Font.Charset = ANSI_CHARSET
|
||||||
Font.Color = clWindowText
|
Font.Color = clWindowText
|
||||||
@ -282,27 +286,30 @@ object mainFrm: TmainFrm
|
|||||||
Zoom = 100
|
Zoom = 100
|
||||||
OnChange = logBoxChange
|
OnChange = logBoxChange
|
||||||
OnMouseDown = logBoxMouseDown
|
OnMouseDown = logBoxMouseDown
|
||||||
|
ExplicitWidth = 660
|
||||||
end
|
end
|
||||||
object logTitle: TPanel
|
object logTitle: TPanel
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 597
|
Width = 563
|
||||||
Height = 23
|
Height = 23
|
||||||
Align = alTop
|
Align = alTop
|
||||||
BevelOuter = bvNone
|
BevelOuter = bvNone
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
|
ExplicitWidth = 660
|
||||||
object titlePnl: TPanel
|
object titlePnl: TPanel
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 337
|
Width = 303
|
||||||
Height = 23
|
Height = 23
|
||||||
Align = alClient
|
Align = alClient
|
||||||
BevelOuter = bvNone
|
BevelOuter = bvNone
|
||||||
Caption = 'Log'
|
Caption = 'Log'
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
|
ExplicitWidth = 400
|
||||||
end
|
end
|
||||||
object logToolbar: TPanel
|
object logToolbar: TPanel
|
||||||
Left = 337
|
Left = 303
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 260
|
Width = 260
|
||||||
Height = 23
|
Height = 23
|
||||||
@ -310,6 +317,7 @@ object mainFrm: TmainFrm
|
|||||||
AutoSize = True
|
AutoSize = True
|
||||||
BevelOuter = bvNone
|
BevelOuter = bvNone
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
|
ExplicitLeft = 400
|
||||||
object collapsedPnl: TPanel
|
object collapsedPnl: TPanel
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 0
|
Top = 0
|
||||||
@ -557,7 +565,7 @@ object mainFrm: TmainFrm
|
|||||||
Left = 0
|
Left = 0
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 313
|
Width = 313
|
||||||
Height = 197
|
Height = 289
|
||||||
Align = alLeft
|
Align = alLeft
|
||||||
BevelOuter = bvNone
|
BevelOuter = bvNone
|
||||||
Caption = 'filesPnl'
|
Caption = 'filesPnl'
|
||||||
@ -566,7 +574,7 @@ object mainFrm: TmainFrm
|
|||||||
Left = 0
|
Left = 0
|
||||||
Top = 23
|
Top = 23
|
||||||
Width = 313
|
Width = 313
|
||||||
Height = 174
|
Height = 266
|
||||||
Align = alClient
|
Align = alClient
|
||||||
BevelInner = bvLowered
|
BevelInner = bvLowered
|
||||||
BevelOuter = bvSpace
|
BevelOuter = bvSpace
|
||||||
@ -616,16 +624,17 @@ object mainFrm: TmainFrm
|
|||||||
end
|
end
|
||||||
object connPnl: TPanel
|
object connPnl: TPanel
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 202
|
Top = 294
|
||||||
Width = 913
|
Width = 879
|
||||||
Height = 106
|
Height = 106
|
||||||
Align = alBottom
|
Align = alBottom
|
||||||
BevelOuter = bvNone
|
BevelOuter = bvNone
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
|
ExplicitWidth = 976
|
||||||
object sbar: TStatusBar
|
object sbar: TStatusBar
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 87
|
Top = 87
|
||||||
Width = 913
|
Width = 879
|
||||||
Height = 19
|
Height = 19
|
||||||
Panels = <
|
Panels = <
|
||||||
item
|
item
|
||||||
@ -633,11 +642,12 @@ object mainFrm: TmainFrm
|
|||||||
end>
|
end>
|
||||||
OnDblClick = sbarDblClick
|
OnDblClick = sbarDblClick
|
||||||
OnMouseDown = sbarMouseDown
|
OnMouseDown = sbarMouseDown
|
||||||
|
ExplicitWidth = 976
|
||||||
end
|
end
|
||||||
object connBox: TListView
|
object connBox: TListView
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 913
|
Width = 879
|
||||||
Height = 87
|
Height = 87
|
||||||
Align = alClient
|
Align = alClient
|
||||||
Columns = <
|
Columns = <
|
||||||
@ -660,6 +670,7 @@ object mainFrm: TmainFrm
|
|||||||
item
|
item
|
||||||
Alignment = taCenter
|
Alignment = taCenter
|
||||||
Caption = 'Speed'
|
Caption = 'Speed'
|
||||||
|
Width = 100
|
||||||
end
|
end
|
||||||
item
|
item
|
||||||
Alignment = taCenter
|
Alignment = taCenter
|
||||||
@ -684,6 +695,7 @@ object mainFrm: TmainFrm
|
|||||||
ViewStyle = vsReport
|
ViewStyle = vsReport
|
||||||
OnAdvancedCustomDrawSubItem = connBoxAdvancedCustomDrawSubItem
|
OnAdvancedCustomDrawSubItem = connBoxAdvancedCustomDrawSubItem
|
||||||
OnData = connBoxData
|
OnData = connBoxData
|
||||||
|
ExplicitWidth = 976
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -3153,8 +3165,8 @@ object mainFrm: TmainFrm
|
|||||||
object connmenu: TPopupMenu
|
object connmenu: TPopupMenu
|
||||||
Images = images
|
Images = images
|
||||||
OnPopup = connmenuPopup
|
OnPopup = connmenuPopup
|
||||||
Left = 248
|
Left = 264
|
||||||
Top = 320
|
Top = 408
|
||||||
object Kickconnection1: TMenuItem
|
object Kickconnection1: TMenuItem
|
||||||
Caption = 'Kick connection'
|
Caption = 'Kick connection'
|
||||||
OnClick = Kickconnection1Click
|
OnClick = Kickconnection1Click
|
||||||
@ -3272,7 +3284,6 @@ object mainFrm: TmainFrm
|
|||||||
object logRequestsChk: TMenuItem
|
object logRequestsChk: TMenuItem
|
||||||
AutoCheck = True
|
AutoCheck = True
|
||||||
Caption = 'Requests'
|
Caption = 'Requests'
|
||||||
Checked = True
|
|
||||||
end
|
end
|
||||||
object DumprequestsChk: TMenuItem
|
object DumprequestsChk: TMenuItem
|
||||||
AutoCheck = True
|
AutoCheck = True
|
||||||
|
|||||||
9
main.pas
9
main.pas
@ -4781,6 +4781,8 @@ var
|
|||||||
end; // limitsExceededOnDownload
|
end; // limitsExceededOnDownload
|
||||||
|
|
||||||
procedure extractParams();
|
procedure extractParams();
|
||||||
|
const
|
||||||
|
MAX = 1000;
|
||||||
var
|
var
|
||||||
s: string;
|
s: string;
|
||||||
i: integer;
|
i: integer;
|
||||||
@ -4790,7 +4792,12 @@ var
|
|||||||
s:=replaceStr(s,'+',' ');
|
s:=replaceStr(s,'+',' ');
|
||||||
data.urlvars.text:=s;
|
data.urlvars.text:=s;
|
||||||
for i:=0 to data.urlvars.count-1 do
|
for i:=0 to data.urlvars.count-1 do
|
||||||
data.urlvars[i]:=decodeURL(ansistring(data.urlvars[i]));
|
begin
|
||||||
|
s:=decodeURL(ansistring(data.urlvars[i]));
|
||||||
|
if length(s) > MAX then
|
||||||
|
setLength(s, MAX);
|
||||||
|
data.urlvars[i]:=s;
|
||||||
|
end;
|
||||||
end; // extractParams
|
end; // extractParams
|
||||||
|
|
||||||
procedure closeUploadingFile();
|
procedure closeUploadingFile();
|
||||||
|
|||||||
@ -1783,10 +1783,7 @@ try
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
if not mainfrm.enableMacrosChk.checked then
|
if not mainfrm.enableMacrosChk.checked then
|
||||||
begin
|
exit(fullMacro);
|
||||||
result:=fullMacro;
|
|
||||||
exit;
|
|
||||||
end;
|
|
||||||
|
|
||||||
if pars.count = 0 then exit;
|
if pars.count = 0 then exit;
|
||||||
// extract first parameter as 'name'
|
// extract first parameter as 'name'
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user