security: sanitize internal infrastructure details from open source package
- Remove production_test_sequence.sh (DAW-specific production tests) - Remove setup_env.sh (obsolete .env setup, replaced by furt.conf) - Sanitize test scripts: replace dragons-at-work.de with example.com - Sanitize API keys: replace dev keys with placeholder values - Remove hardcoded DAW fallbacks from http_server.lua and smtp.lua - Update .gitignore to exclude production-specific test files Tests remain functional for developers with example domains. All internal DAW infrastructure details removed from package. Closes #101
This commit is contained in:
parent
baa2490bbe
commit
08b49d3d75
11 changed files with 77 additions and 259 deletions
20
scripts/test_smtp.sh
Normal file → Executable file
20
scripts/test_smtp.sh
Normal file → Executable file
|
|
@ -36,7 +36,7 @@ else
|
|||
echo "[ERROR] Validation failed"
|
||||
fi
|
||||
|
||||
# Test 3: Invalid Email Format
|
||||
# Test 3: Invalid Email Format
|
||||
echo ""
|
||||
echo "[3] Testing email validation..."
|
||||
email_validation_response=$(curl -s -X POST "$SERVER_URL/v1/mail/send" \
|
||||
|
|
@ -54,36 +54,36 @@ fi
|
|||
# Test 4: Valid Mail Request (REAL SMTP TEST)
|
||||
echo ""
|
||||
echo "[4] Testing REAL mail sending..."
|
||||
echo "WARNING: This will send a real email to michael@dragons-at-work.de"
|
||||
echo "WARNING: This will send a real email to admin@example.com"
|
||||
read -p "Continue with real mail test? (y/N): " -n 1 -r
|
||||
echo
|
||||
|
||||
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
||||
echo "Sending real test email..."
|
||||
|
||||
|
||||
mail_response=$(curl -s -X POST "$SERVER_URL/v1/mail/send" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{
|
||||
"name": "Furt Test User",
|
||||
"email": "test@dragons-at-work.de",
|
||||
"email": "test@example.com",
|
||||
"subject": "Furt SMTP Test - Week 2 Success!",
|
||||
"message": "This is a test email from the Furt Lua HTTP-Server.\n\nSMTP Integration is working!\n\nTimestamp: '$(date)'\nServer: furt-lua v1.0"
|
||||
}')
|
||||
|
||||
|
||||
echo "Response: $mail_response"
|
||||
|
||||
|
||||
# Check for success
|
||||
if echo "$mail_response" | grep -q '"success":true'; then
|
||||
echo "[OK] MAIL SENT SUCCESSFULLY!"
|
||||
echo "Check michael@dragons-at-work.de inbox"
|
||||
|
||||
echo "Check admin@example.com inbox"
|
||||
|
||||
# Extract request ID
|
||||
request_id=$(echo "$mail_response" | grep -o '"request_id":"[^"]*"' | cut -d'"' -f4)
|
||||
echo "Request ID: $request_id"
|
||||
else
|
||||
echo "[ERROR] Mail sending failed"
|
||||
echo "Check server logs and SMTP credentials"
|
||||
|
||||
|
||||
# Show error details
|
||||
if echo "$mail_response" | grep -q "error"; then
|
||||
error_msg=$(echo "$mail_response" | grep -o '"error":"[^"]*"' | cut -d'"' -f4)
|
||||
|
|
@ -126,7 +126,7 @@ echo "Performance: ${duration_ms}ms"
|
|||
echo ""
|
||||
echo "Week 2 Challenge Status:"
|
||||
echo " SMTP Integration: COMPLETE"
|
||||
echo " Environment Variables: CHECK .env"
|
||||
echo " Environment Variables: CHECK .env"
|
||||
echo " Native Lua Implementation: DONE"
|
||||
echo " Production Ready: READY FOR TESTING"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue