Skip to content

Commit 058b9d3

Browse files
Also accept 'https://' as URL in tracker. [Issue GerryFerdinandus#9]
1 parent 40816b0 commit 058b9d3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

source/main.pas

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -754,7 +754,7 @@ procedure TFormTrackerModify.CheckedOnOffAllTrackers(Value: boolean);
754754
function TFormTrackerModify.ValidTrackerURL(const TrackerURL: UTF8String): boolean;
755755
begin
756756
//TrackerURL should be cleanup with UTF8trim()
757-
Result := (Pos('http://', TrackerURL) = 1) or (Pos('udp://', TrackerURL) = 1);
757+
Result := (Pos('http://', TrackerURL) = 1) or (Pos('https://', TrackerURL) = 1) or (Pos('udp://', TrackerURL) = 1);
758758
end;
759759

760760
function TFormTrackerModify.CopyUserInputNewTrackersToList: boolean;
@@ -775,7 +775,7 @@ function TFormTrackerModify.CopyUserInputNewTrackersToList: boolean;
775775
if TrackerStr = '' then
776776
continue;
777777

778-
//All the tracker must begin with 'http://' or 'udp://'
778+
//All the tracker must begin with 'http(s)://' or 'udp://'
779779
if ValidTrackerURL(TrackerStr) then
780780
begin
781781
FTrackerAddedByUserList.Add(TrackerStr);
@@ -791,7 +791,7 @@ function TFormTrackerModify.CopyUserInputNewTrackersToList: boolean;
791791
begin
792792
//Show error
793793
Application.MessageBox(PChar(@TrackerStr[1]),
794-
'Error: Tracker URL must begin with http:// or udp://', MB_ICONERROR);
794+
'Error: Tracker URL must begin with http(s):// or udp://', MB_ICONERROR);
795795
end;
796796
//dot not continue with error.
797797
Result := False;

0 commit comments

Comments
 (0)