Test Date: December 2, 2025
Application: DocTransfer
Test URL: http://localhost:5173
Objective: Verify bcrypt password hashing works
Steps:
- ✅ Open http://localhost:5173/dataroom (already there!)
- Upload a test file (any small file - PDF, image, text)
- Enable "Password Protection" toggle
- Set password:
TestPass123 - Click "Generate Secure Link"
- Copy the generated share link
Expected Result:
- ✅ Link generated successfully
- ✅ No errors in browser console
Objective: Test password decryption works with bcrypt
Steps:
- Open share link from Test 1 in incognito/private window
- You should see password prompt
- First, try WRONG password:
wrongpass - Then try CORRECT password:
TestPass123
Expected Results:
- ❌ Wrong password: Shows "Incorrect password"
- ✅ Correct password: Unlocks document, shows download button
Objective: Verify rate limiting prevents spam
Steps:
- Upload a new document
- Enable "Require Email Verification" toggle
- Enter email (optional):
test@example.com - Generate link and open in incognito
- Enter email and click "Send Verification Code"
- Immediately click again (within 60 seconds)
Expected Results:
- ✅ First request: Shows "Verification code sent"
- ✅ Second request: Shows "Please wait XX seconds before requesting a new code"
- ✅ NO verification code visible in browser console (in production mode)
Objective: Verify AES-256 encryption still works
Steps:
- Upload a file without password protection
- Generate share link
- Open link in incognito
- Click "Download File"
Expected Results:
- ✅ File downloads successfully
- ✅ File opens correctly (decrypted properly)
- ✅ File content is intact
Objective: Confirm database is secured
Steps:
- Open https://app.supabase.com → Your Project → SQL Editor
- Run this query:
SELECT policyname, cmd
FROM pg_policies
WHERE tablename = 'documents'
ORDER BY policyname;Expected Results:
- ✅ Shows exactly 2 policies:
Allow Anonymous Uploads(INSERT)Secure Read by Share Link(SELECT)
- ❌ NO "Allow Updates" policy
- ❌ NO "Allow Deletes" policy
Objective: Verify unauthorized actions are blocked
In Supabase SQL Editor, try these:
-- Test 1: Try to read all documents (might show some but restricted)
SELECT * FROM documents;
-- Test 2: Try to update a document (SHOULD FAIL)
UPDATE documents SET name = 'hacked' WHERE true;
-- Test 3: Try to delete documents (SHOULD FAIL)
DELETE FROM documents WHERE true;Expected Results:
- Test 1: Shows limited results (this is OK)
- Test 2: ❌ Error: "violates row-level security policy" ✅
- Test 3: ❌ Error: "violates row-level security policy" ✅
Fill this out as you test:
═══════════════════════════════════════════════════════════
TEST RESULTS
═══════════════════════════════════════════════════════════
Test 1: Password-Protected Upload
[ ] PASS [ ] FAIL
Notes: _________________________________________________
Test 2: Password Verification (Wrong Password)
[ ] PASS [ ] FAIL
Notes: _________________________________________________
Test 2b: Password Verification (Correct Password)
[ ] PASS [ ] FAIL
Notes: _________________________________________________
Test 3: Email Rate Limiting
[ ] PASS [ ] FAIL
Notes: _________________________________________________
Test 4: File Download & Decryption
[ ] PASS [ ] FAIL
Notes: _________________________________________________
Test 5: Database RLS Policies
[ ] PASS [ ] FAIL
Policies found: ________________________________________
Test 6a: Unauthorized UPDATE blocked
[ ] PASS [ ] FAIL
Error message: _________________________________________
Test 6b: Unauthorized DELETE blocked
[ ] PASS [ ] FAIL
Error message: _________________________________________
═══════════════════════════════════════════════════════════
OVERALL RESULT
═══════════════════════════════════════════════════════════
Total Tests: 8
Passed: ____
Failed: ____
Security Status: [ ] SECURE [ ] NEEDS FIXES
Notes:
___________________________________________________________
___________________________________________________________
___________________________________________________________
Cause: Old plain-text passwords in database
Fix: Run in Supabase SQL Editor:
UPDATE documents SET password = NULL WHERE password IS NOT NULL;Then upload fresh test document.
Cause: Code change not compiled
Fix:
- Stop dev server (Ctrl+C)
- Run:
npm run dev - Refresh browser
Cause: Document might be expired or deleted
Fix: Upload a new document and use fresh link
Cause: Running in development mode
Fix: This is expected! In dev mode, codes show for testing.
- In production build, they won't show (only in DEV environment)
ALL of these must be TRUE:
- ✅ Password-protected uploads work
- ✅ Wrong passwords are rejected
- ✅ Correct passwords unlock documents
- ✅ Rate limiting prevents spam (60 second cooldown)
- ✅ Files encrypt and decrypt correctly
- ✅ Database has only 2 RLS policies
- ✅ UPDATE attempts fail with security error
- ✅ DELETE attempts fail with security error
If all 8 checks pass → Your application is SECURE! 🎉
Don't have time for full tests? Do this quick check:
- Upload a password-protected file
- Open link in incognito
- Try wrong password → Should fail ❌
- Try correct password → Should work ✅
- Download file → Should decrypt properly ✅
All 3 work? You're good to go! ✅
For production deployment approval, collect:
- Screenshot of upload page
- Screenshot of password verification working
- Screenshot of Supabase policies (showing only 2)
- Screenshot of UPDATE/DELETE errors
- Test file that was encrypted/decrypted successfully
- ✅ Mark security fixes as complete
- 🚀 Deploy to production
- 📧 Plan real email service integration
- 👥 Consider adding user authentication
- 📝 Document which tests failed
- 🔍 Check browser console for errors
- 🔧 Review the fix guides
- 💬 Ask for help with specific error messages
Ready to test? Start with Test 1 above! 🧪
Good luck! 🍀