From b874a2f7f26fa679d46fa3c916691c49a4e46653 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Istv=C3=A1n=20So=C3=B3s?= Date: Tue, 26 Sep 2023 22:12:29 +0200 Subject: [PATCH] Increase asset limits to 256 kb. (#7065) --- app/lib/package/backend.dart | 2 +- pkg/pub_integration/lib/script/publishing.dart | 4 ++-- pkg/pub_package_reader/lib/pub_package_reader.dart | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/lib/package/backend.dart b/app/lib/package/backend.dart index 3a0a493eb5..6a6db09873 100644 --- a/app/lib/package/backend.dart +++ b/app/lib/package/backend.dart @@ -48,7 +48,7 @@ import 'upload_signer_service.dart'; // The maximum stored length of `README.md` and other user-provided file content // that is stored separately in the database. -final maxAssetContentLength = 128 * 1024; +final maxAssetContentLength = 256 * 1024; /// The maximum number of versions a package is allowed to have. final _defaultMaxVersionsPerPackage = 1000; diff --git a/pkg/pub_integration/lib/script/publishing.dart b/pkg/pub_integration/lib/script/publishing.dart index dc9c8ffe38..01ba1a6b26 100644 --- a/pkg/pub_integration/lib/script/publishing.dart +++ b/pkg/pub_integration/lib/script/publishing.dart @@ -64,7 +64,7 @@ class PublishingScript { await dart.publish(_dummyDir.path, expectedErrorContains: - '`CHANGELOG.md` exceeds the maximum content length (131072 bytes).'); + '`CHANGELOG.md` exceeds the maximum content length'); await _dummyDir.delete(recursive: true); // upload package @@ -159,7 +159,7 @@ class PublishingScript { _dummyExampleDir = Directory(path.join(_dummyDir.path, 'example')); await _dummyDir.create(recursive: true); await createDummyPkg(_dummyDir.path, _newDummyVersion, - changelogContentSizeInKB: oversized ? 129 : 4); + changelogContentSizeInKB: oversized ? 257 : 4); } Future _createFakeRetryPkg() async { diff --git a/pkg/pub_package_reader/lib/pub_package_reader.dart b/pkg/pub_package_reader/lib/pub_package_reader.dart index 667766ed81..6f24bcef5d 100644 --- a/pkg/pub_package_reader/lib/pub_package_reader.dart +++ b/pkg/pub_package_reader/lib/pub_package_reader.dart @@ -73,7 +73,7 @@ class PackageSummary { Future summarizePackageArchive( String archivePath, { /// The maximum length of the extracted content text. - int maxContentLength = 128 * 1024, + int maxContentLength = 256 * 1024, /// The maximum file size of the archive (gzipped or compressed) and /// the maximum total size of the files inside the archive.