Browse Source

increase file size to 500 mb

main
Silberengel 4 weeks ago
parent
commit
e01d97e355
  1. 2
      README.md
  2. 2
      src/lib/services/git/file-manager.ts

2
README.md

@ -44,7 +44,7 @@ A decentralized, Nostr-based git server that enables git repository hosting and @@ -44,7 +44,7 @@ A decentralized, Nostr-based git server that enables git repository hosting and
### Security & Validation
- **Path Traversal Protection**: Validates and sanitizes file paths
- **Input Validation**: Validates commit messages, author names, emails, and file paths
- **File Size Limits**: 100 MB maximum per file
- **File Size Limits**: 500 MB maximum per file (allows for images and demo videos)
- **Ownership Verification**: Verifies repository ownership via self-transfer events or verification files
- **Commit Signing**: Sign commits using Nostr private keys (nsec or hex format)
- Supports both bech32 (nsec) and hex format keys

2
src/lib/services/git/file-manager.ts

@ -311,7 +311,7 @@ export class FileManager { @@ -311,7 +311,7 @@ export class FileManager {
}
// Validate content size (prevent extremely large files)
const maxFileSize = 100 * 1024 * 1024; // 100 MB per file
const maxFileSize = 500 * 1024 * 1024; // 500 MB per file (allows for images and demo videos)
if (Buffer.byteLength(content, 'utf-8') > maxFileSize) {
throw new Error(`File is too large (max ${maxFileSize / 1024 / 1024} MB)`);
}

Loading…
Cancel
Save