Skip to content

Commit 42b37cc

Browse files
Added default port for implicit FTPS (#20603)
1 parent 4bf61e2 commit 42b37cc

File tree

10 files changed

+43
-19
lines changed

10 files changed

+43
-19
lines changed

Tasks/FtpUploadV2/ftpuploadtask.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,10 +220,18 @@ function getAccessOption(options: FtpOptions): ftp.AccessOptions {
220220

221221
const hostName: string = options.serverEndpointUrl.hostname!;
222222
const portStr: string = options.serverEndpointUrl.port!;
223-
let port: number = 21;
223+
let port: number;
224+
224225
if (portStr) {
225226
// port not explicitly specified, use default
226227
port = parseInt(portStr);
228+
} else if (secure === "implicit") {
229+
// port for implicit FTPS
230+
port = 990;
231+
}
232+
else {
233+
// port for FTP and explicit FTPS
234+
port = 21;
227235
}
228236

229237
console.log(tl.loc("ConnectPort", hostName, port));

Tasks/FtpUploadV2/task.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"demands": [],
1919
"version": {
2020
"Major": 2,
21-
"Minor": 246,
21+
"Minor": 248,
2222
"Patch": 0
2323
},
2424
"minimumAgentVersion": "2.182.1",

Tasks/FtpUploadV2/task.loc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"demands": [],
1919
"version": {
2020
"Major": 2,
21-
"Minor": 246,
21+
"Minor": 248,
2222
"Patch": 0
2323
},
2424
"minimumAgentVersion": "2.182.1",

_generated/FtpUploadV2.versionmap.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Default|2.246.0
2-
Node20-225|2.246.1
1+
Default|2.248.0
2+
Node20-225|2.248.1

_generated/FtpUploadV2/ftpuploadtask.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,10 +220,18 @@ function getAccessOption(options: FtpOptions): ftp.AccessOptions {
220220

221221
const hostName: string = options.serverEndpointUrl.hostname!;
222222
const portStr: string = options.serverEndpointUrl.port!;
223-
let port: number = 21;
223+
let port: number;
224+
224225
if (portStr) {
225226
// port not explicitly specified, use default
226227
port = parseInt(portStr);
228+
} else if (secure === "implicit") {
229+
// port for implicit FTPS
230+
port = 990;
231+
}
232+
else {
233+
// port for FTP and explicit FTPS
234+
port = 21;
227235
}
228236

229237
console.log(tl.loc("ConnectPort", hostName, port));

_generated/FtpUploadV2/task.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"demands": [],
1919
"version": {
2020
"Major": 2,
21-
"Minor": 246,
21+
"Minor": 248,
2222
"Patch": 0
2323
},
2424
"minimumAgentVersion": "2.182.1",
@@ -216,7 +216,7 @@
216216
"UploadFailed": "Ftp Upload failed"
217217
},
218218
"_buildConfigMapping": {
219-
"Default": "2.246.0",
220-
"Node20-225": "2.246.1"
219+
"Default": "2.248.0",
220+
"Node20-225": "2.248.1"
221221
}
222222
}

_generated/FtpUploadV2/task.loc.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"demands": [],
1919
"version": {
2020
"Major": 2,
21-
"Minor": 246,
21+
"Minor": 248,
2222
"Patch": 0
2323
},
2424
"minimumAgentVersion": "2.182.1",
@@ -216,7 +216,7 @@
216216
"UploadFailed": "ms-resource:loc.messages.UploadFailed"
217217
},
218218
"_buildConfigMapping": {
219-
"Default": "2.246.0",
220-
"Node20-225": "2.246.1"
219+
"Default": "2.248.0",
220+
"Node20-225": "2.248.1"
221221
}
222222
}

_generated/FtpUploadV2_Node20/ftpuploadtask.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,10 +220,18 @@ function getAccessOption(options: FtpOptions): ftp.AccessOptions {
220220

221221
const hostName: string = options.serverEndpointUrl.hostname!;
222222
const portStr: string = options.serverEndpointUrl.port!;
223-
let port: number = 21;
223+
let port: number;
224+
224225
if (portStr) {
225226
// port not explicitly specified, use default
226227
port = parseInt(portStr);
228+
} else if (secure === "implicit") {
229+
// port for implicit FTPS
230+
port = 990;
231+
}
232+
else {
233+
// port for FTP and explicit FTPS
234+
port = 21;
227235
}
228236

229237
console.log(tl.loc("ConnectPort", hostName, port));

_generated/FtpUploadV2_Node20/task.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"demands": [],
1919
"version": {
2020
"Major": 2,
21-
"Minor": 246,
21+
"Minor": 248,
2222
"Patch": 1
2323
},
2424
"minimumAgentVersion": "2.182.1",
@@ -220,7 +220,7 @@
220220
"UploadFailed": "Ftp Upload failed"
221221
},
222222
"_buildConfigMapping": {
223-
"Default": "2.246.0",
224-
"Node20-225": "2.246.1"
223+
"Default": "2.248.0",
224+
"Node20-225": "2.248.1"
225225
}
226226
}

_generated/FtpUploadV2_Node20/task.loc.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"demands": [],
1919
"version": {
2020
"Major": 2,
21-
"Minor": 246,
21+
"Minor": 248,
2222
"Patch": 1
2323
},
2424
"minimumAgentVersion": "2.182.1",
@@ -220,7 +220,7 @@
220220
"UploadFailed": "ms-resource:loc.messages.UploadFailed"
221221
},
222222
"_buildConfigMapping": {
223-
"Default": "2.246.0",
224-
"Node20-225": "2.246.1"
223+
"Default": "2.248.0",
224+
"Node20-225": "2.248.1"
225225
}
226226
}

0 commit comments

Comments
 (0)