Skip to content

Commit

Permalink
Increase asset limits to 256 kb. (#7065)
Browse files Browse the repository at this point in the history
  • Loading branch information
isoos authored Sep 26, 2023
1 parent cdef743 commit b874a2f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/lib/package/backend.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions pkg/pub_integration/lib/script/publishing.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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<void> _createFakeRetryPkg() async {
Expand Down
2 changes: 1 addition & 1 deletion pkg/pub_package_reader/lib/pub_package_reader.dart
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class PackageSummary {
Future<PackageSummary> 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.
Expand Down

0 comments on commit b874a2f

Please sign in to comment.