bud02 completed

This commit is contained in:
Your Name
2025-09-02 12:54:22 -04:00
parent e98ec5489a
commit db3f078583
29 changed files with 5024 additions and 7 deletions

View File

@@ -130,9 +130,9 @@ This document outlines the implementation plan for ginxsom, a FastCGI-based Blos
### 2.7 Testing & Validation
- [x] Test uploads without authentication
- [x] Test uploads with valid nostr auth
- [x] Test uploads with invalid auth
- [x] Test hash mismatch scenarios
- [x] Test uploads with valid nostr auth**WORKING** (HTTP 200 success)
- [x] Test uploads with invalid auth**WORKING** (proper error responses with specific error types)
- [x] Test hash mismatch scenarios**WORKING** (409 Conflict responses)
- [ ] Test file size limits
- [x] Verify blob descriptors are correct
- [x] Verify database metadata storage (uploader_pubkey and filename)
@@ -376,8 +376,8 @@ This document outlines the implementation plan for ginxsom, a FastCGI-based Blos
- [x] SHA-256 hash calculation during upload
- [x] File storage to blobs/ directory
- [x] Blob descriptor JSON response
- [x] Authenticated uploads working (Nostr kind 24242 event validation)
- [x] Proper error handling for upload scenarios
- [x] Authenticated uploads working (Nostr kind 24242 event validation)
- [x] Proper error handling for upload scenarios
- [x] Database metadata storage during upload (with uploader_pubkey and filename)
- [x] List blobs endpoint implemented (GET /list/<pubkey>)
- [x] Delete blob endpoint implemented (DELETE /<sha256>)
@@ -483,6 +483,9 @@ Could propose new Blossom BUD for two-phase upload:
- [ ] Memory safety in C implementation
- [ ] Proper error message sanitization
- [ ] Log security (no sensitive data)
- [x] **secp256k1 Context Initialization Fixed** - Authentication system now fully functional
- [x] **API Refactoring Complete** - Upgraded from low-level crypto headers to high-level `nostr_crypto_init()` API
- [x] **Enhanced Error Messages** - Specific error types: event_expired, invalid_signature, invalid_pubkey, etc.
- [ ] **Upload DOS vulnerability** - Current implementation vulnerable to memory exhaustion attacks
---

View File

@@ -166,3 +166,66 @@ File data as string: This is a set file to test. Don't edit.
Calculated SHA-256: 3f49f934e838893bdc516e680ade3cee2a848bbf42c3e7aba0108cf7cedb8540
=== END DEBUG SESSION ===
=== HASH DEBUG SESSION ===
Content length: 39
File data to hash: 546869732069732061207365742066696c6520746f20746573742e20446f6e277420656469742e
File data as string: This is a set file to test. Don't edit.
Calculated SHA-256: 3f49f934e838893bdc516e680ade3cee2a848bbf42c3e7aba0108cf7cedb8540
=== END DEBUG SESSION ===
=== HASH DEBUG SESSION ===
Content length: 296
File data to hash: 5465737420626c6f6220636f6e74656e7420666f722047696e78736f6d20426c6f73736f6d207365727665720a54696d657374616d703a20323032352d30392d30325431323a34353a32382d30343a30300a52616e646f6d20646174613a20386435393962643333353636323466636237383266383332623866303364396135333937326238343732613162646361633833656165333533653732323632310a54657374206d6573736167653a2048656c6c6f2066726f6d207075745f746573742e7368210a0a546869732066696c65206973207573656420746f2074657374207468652075706c6f61642066756e6374696f6e616c6974790a6f66207468652047696e78736f6d20426c6f73736f6d2073657276657220696d706c656d656e746174696f6e2e0a
File data as string: Test blob content for Ginxsom Blossom server
Timestamp: 2025-09-02T12:45:28-04:00
Random data: 8d599bd3356624fcb782f832b8f03d9a53972b8472a1bdcac83eae353e722621
Test message: Hello from put_test.sh!
This file is used to test the upload functionality
of the Ginxsom Blossom server implementation.
Calculated SHA-256: 7b3b92e2ffefed8c7444e9c78c432d279d859672e465bfc90fe44a7a2566a156
=== END DEBUG SESSION ===
=== HASH DEBUG SESSION ===
Content length: 296
File data to hash: 5465737420626c6f6220636f6e74656e7420666f722047696e78736f6d20426c6f73736f6d207365727665720a54696d657374616d703a20323032352d30392d30325431323a34353a33332d30343a30300a52616e646f6d20646174613a20306434646365343535663861376264666238626431636338653930633235343666636237316630363839633337373435333061646661373138303134633930350a54657374206d6573736167653a2048656c6c6f2066726f6d207075745f746573742e7368210a0a546869732066696c65206973207573656420746f2074657374207468652075706c6f61642066756e6374696f6e616c6974790a6f66207468652047696e78736f6d20426c6f73736f6d2073657276657220696d706c656d656e746174696f6e2e0a
File data as string: Test blob content for Ginxsom Blossom server
Timestamp: 2025-09-02T12:45:33-04:00
Random data: 0d4dce455f8a7bdfb8bd1cc8e90c2546fcb71f0689c3774530adfa718014c905
Test message: Hello from put_test.sh!
This file is used to test the upload functionality
of the Ginxsom Blossom server implementation.
Calculated SHA-256: a27df9a425b43ca292eaf4e3779229d1955ea2e25aeddef196232008d4a25c5a
=== END DEBUG SESSION ===
=== HASH DEBUG SESSION ===
Content length: 296
File data to hash: 5465737420626c6f6220636f6e74656e7420666f722047696e78736f6d20426c6f73736f6d207365727665720a54696d657374616d703a20323032352d30392d30325431323a34353a34322d30343a30300a52616e646f6d20646174613a20643239383630663962333735633266393634646433626362343436366661303138666537306163363333356234656537396365633030306334663764653165390a54657374206d6573736167653a2048656c6c6f2066726f6d207075745f746573742e7368210a0a546869732066696c65206973207573656420746f2074657374207468652075706c6f61642066756e6374696f6e616c6974790a6f66207468652047696e78736f6d20426c6f73736f6d2073657276657220696d706c656d656e746174696f6e2e0a
File data as string: Test blob content for Ginxsom Blossom server
Timestamp: 2025-09-02T12:45:42-04:00
Random data: d29860f9b375c2f964dd3bcb4466fa018fe70ac6335b4ee79cec000c4f7de1e9
Test message: Hello from put_test.sh!
This file is used to test the upload functionality
of the Ginxsom Blossom server implementation.
Calculated SHA-256: 61993aa6a0969bca4316461550095adbd2b5e82f691f514454a8f4082179c7c1
=== END DEBUG SESSION ===
=== HASH DEBUG SESSION ===
Content length: 296
File data to hash: 5465737420626c6f6220636f6e74656e7420666f722047696e78736f6d20426c6f73736f6d207365727665720a54696d657374616d703a20323032352d30392d30325431323a34363a35302d30343a30300a52616e646f6d20646174613a20346630333037316538646536373133353963633966326434633836383832356335393736303161333232346339323463313661633633643331323232353935650a54657374206d6573736167653a2048656c6c6f2066726f6d207075745f746573742e7368210a0a546869732066696c65206973207573656420746f2074657374207468652075706c6f61642066756e6374696f6e616c6974790a6f66207468652047696e78736f6d20426c6f73736f6d2073657276657220696d706c656d656e746174696f6e2e0a
File data as string: Test blob content for Ginxsom Blossom server
Timestamp: 2025-09-02T12:46:50-04:00
Random data: 4f03071e8de671359cc9f2d4c868825c597601a3224c924c16ac63d31222595e
Test message: Hello from put_test.sh!
This file is used to test the upload functionality
of the Ginxsom Blossom server implementation.
Calculated SHA-256: 8f68175a71f1a38e70e0dac1b45973510973fd713a37a10e9b4d04b1558a7999
=== END DEBUG SESSION ===

View File

@@ -210,3 +210,63 @@ nostr_verify_event_signature result: 0 (Success)
nostr_validate_event result: 0 (Success)
=== END COMPLETE DEBUG ===
=== STRUCTURE VALIDATION DEBUG ===
nostr_validate_event_structure result: 0 (Success)
=== END STRUCTURE DEBUG ===
=== CRYPTO VALIDATION DEBUG ===
nostr_verify_event_signature result: 0 (Success)
=== END CRYPTO DEBUG ===
=== COMPLETE VALIDATION DEBUG ===
nostr_validate_event result: 0 (Success)
=== END COMPLETE DEBUG ===
=== STRUCTURE VALIDATION DEBUG ===
nostr_validate_event_structure result: 0 (Success)
=== END STRUCTURE DEBUG ===
=== CRYPTO VALIDATION DEBUG ===
nostr_verify_event_signature result: 0 (Success)
=== END CRYPTO DEBUG ===
=== COMPLETE VALIDATION DEBUG ===
nostr_validate_event result: 0 (Success)
=== END COMPLETE DEBUG ===
=== STRUCTURE VALIDATION DEBUG ===
nostr_validate_event_structure result: 0 (Success)
=== END STRUCTURE DEBUG ===
=== CRYPTO VALIDATION DEBUG ===
nostr_verify_event_signature result: 0 (Success)
=== END CRYPTO DEBUG ===
=== COMPLETE VALIDATION DEBUG ===
nostr_validate_event result: 0 (Success)
=== END COMPLETE DEBUG ===
=== STRUCTURE VALIDATION DEBUG ===
nostr_validate_event_structure result: 0 (Success)
=== END STRUCTURE DEBUG ===
=== CRYPTO VALIDATION DEBUG ===
nostr_verify_event_signature result: 0 (Success)
=== END CRYPTO DEBUG ===
=== COMPLETE VALIDATION DEBUG ===
nostr_validate_event result: 0 (Success)
=== END COMPLETE DEBUG ===
=== STRUCTURE VALIDATION DEBUG ===
nostr_validate_event_structure result: 0 (Success)
=== END STRUCTURE DEBUG ===
=== CRYPTO VALIDATION DEBUG ===
nostr_verify_event_signature result: 0 (Success)
=== END CRYPTO DEBUG ===
=== COMPLETE VALIDATION DEBUG ===
nostr_validate_event result: 0 (Success)
=== END COMPLETE DEBUG ===

View File

@@ -0,0 +1,7 @@
Test blob content for Ginxsom Blossom server
Timestamp: 2025-09-02T12:45:42-04:00
Random data: d29860f9b375c2f964dd3bcb4466fa018fe70ac6335b4ee79cec000c4f7de1e9
Test message: Hello from put_test.sh!
This file is used to test the upload functionality
of the Ginxsom Blossom server implementation.

View File

@@ -0,0 +1,7 @@
Test blob content for Ginxsom Blossom server
Timestamp: 2025-09-02T12:45:28-04:00
Random data: 8d599bd3356624fcb782f832b8f03d9a53972b8472a1bdcac83eae353e722621
Test message: Hello from put_test.sh!
This file is used to test the upload functionality
of the Ginxsom Blossom server implementation.

View File

@@ -0,0 +1,7 @@
Test blob content for Ginxsom Blossom server
Timestamp: 2025-09-02T12:46:50-04:00
Random data: 4f03071e8de671359cc9f2d4c868825c597601a3224c924c16ac63d31222595e
Test message: Hello from put_test.sh!
This file is used to test the upload functionality
of the Ginxsom Blossom server implementation.

View File

@@ -0,0 +1,7 @@
Test blob content for Ginxsom Blossom server
Timestamp: 2025-09-02T12:45:33-04:00
Random data: 0d4dce455f8a7bdfb8bd1cc8e90c2546fcb71f0689c3774530adfa718014c905
Test message: Hello from put_test.sh!
This file is used to test the upload functionality
of the Ginxsom Blossom server implementation.

Binary file not shown.

Binary file not shown.

View File

@@ -6,3 +6,9 @@
127.0.0.1 - - [02/Sep/2025:11:43:51 -0400] "PUT /upload HTTP/1.1" 401 163 "-" "curl/8.15.0"
127.0.0.1 - - [02/Sep/2025:11:48:32 -0400] "PUT /upload HTTP/1.1" 200 261 "-" "curl/8.15.0"
127.0.0.1 - - [02/Sep/2025:12:01:40 -0400] "PUT /upload HTTP/1.1" 200 261 "-" "curl/8.15.0"
127.0.0.1 - - [02/Sep/2025:12:45:18 -0400] "PUT /upload HTTP/1.1" 200 261 "-" "curl/8.15.0"
127.0.0.1 - - [02/Sep/2025:12:45:29 -0400] "PUT /upload HTTP/1.1" 200 262 "-" "curl/8.15.0"
127.0.0.1 - - [02/Sep/2025:12:45:34 -0400] "PUT /upload HTTP/1.1" 200 262 "-" "curl/8.15.0"
127.0.0.1 - - [02/Sep/2025:12:45:42 -0400] "PUT /upload HTTP/1.1" 200 262 "-" "curl/8.15.0"
127.0.0.1 - - [02/Sep/2025:12:46:50 -0400] "PUT /upload HTTP/1.1" 200 262 "-" "curl/8.15.0"
127.0.0.1 - - [02/Sep/2025:12:49:20 -0400] "GET /list/79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 HTTP/1.1" 200 1520 "-" "curl/8.15.0"

File diff suppressed because it is too large Load Diff

View File

@@ -998,3 +998,4 @@ Event pointer: 0x6176f258bd10
✅ CRITICAL: nostr_secp256k1_xonly_pubkey_parse() SUCCESS!
🔍 Starting Schnorr signature verification...
✅ SUCCESS: Schnorr signature verification passed!
FastCGI wrapper starting at Tue Sep 2 12:45:08 PM EDT 2025

View File

@@ -1 +1 @@
170852
176726