chore: Update dist
This commit is contained in:
parent
01e40c97bf
commit
254d42c4b6
2 changed files with 6 additions and 1 deletions
|
|
@ -2668,7 +2668,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||
|
||||
The following npm package may be included in this product:
|
||||
|
||||
- basic-ftp@5.3.0
|
||||
- basic-ftp@5.3.1
|
||||
|
||||
This package contains the following license:
|
||||
|
||||
|
|
|
|||
5
dist/index.js
generated
vendored
5
dist/index.js
generated
vendored
|
|
@ -52284,6 +52284,7 @@ var require_FtpContext = __commonJS({
|
|||
exports2.FTPError = FTPError;
|
||||
function doNothing() {
|
||||
}
|
||||
var maxControlResponseLength = 2 ** 16;
|
||||
var FTPContext = class {
|
||||
/**
|
||||
* Instantiate an FTP context.
|
||||
|
|
@ -52501,6 +52502,10 @@ Closing reason: ${this._closingError.stack}`;
|
|||
*/
|
||||
_onControlSocketData(chunk) {
|
||||
this.log(`< ${chunk}`);
|
||||
if (this._partialResponse.length + chunk.length > maxControlResponseLength) {
|
||||
this.closeWithError(new Error("FTP control response exceeded maximum allowed size"));
|
||||
return;
|
||||
}
|
||||
const completeResponse = this._partialResponse + chunk;
|
||||
const parsed = (0, parseControlResponse_1.parseControlResponse)(completeResponse);
|
||||
this._partialResponse = parsed.rest;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue