🐛 Bug Report: SMTP Panic #444

Closed
opened 2025-10-08 00:08:54 +03:00 by OVERLORD · 2 comments
Owner

Originally created by @renevo on GitHub.

Reproduction steps

Using https://github.com/loganmarchione/docker-postfixrelay as an smtp relay server

Add new passkey

Expected behavior

Email is sent

Actual Behavior

Application panics:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x60 pc=0x9b75c8]

goroutine 136 [running]:
net/smtp.(*Client).hello(0xceda42?)
	/usr/local/go/src/net/smtp/smtp.go:83 +0x18
net/smtp.(*Client).Quit(0x0)
	/usr/local/go/src/net/smtp/smtp.go:416 +0x20
github.com/stonith404/pocket-id/backend/internal/service.SendEmail[...](0x4000217c20, {{0x400026e038, 0xcd5b8b?}, {0x4000029470?, 0xcd6e4d?}}, {{0xcebeb2?, 0xe0f130?}, 0xd34b48?}, 0x4000189c20?)
	/app/backend/internal/service/email_service.go:115 +0x518
github.com/stonith404/pocket-id/backend/internal/service.(*AuditLogService).CreateNewSignInWithEmail.func1()
	/app/backend/internal/service/audit_log_service.go:67 +0x2d8
created by github.com/stonith404/pocket-id/backend/internal/service.(*AuditLogService).CreateNewSignInWithEmail in goroutine 46
	/app/backend/internal/service/audit_log_service.go:63 +0x370
Originally created by @renevo on GitHub. ### Reproduction steps Using https://github.com/loganmarchione/docker-postfixrelay as an smtp relay server Add new passkey ### Expected behavior Email is sent ### Actual Behavior Application panics: ``` panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x60 pc=0x9b75c8] goroutine 136 [running]: net/smtp.(*Client).hello(0xceda42?) /usr/local/go/src/net/smtp/smtp.go:83 +0x18 net/smtp.(*Client).Quit(0x0) /usr/local/go/src/net/smtp/smtp.go:416 +0x20 github.com/stonith404/pocket-id/backend/internal/service.SendEmail[...](0x4000217c20, {{0x400026e038, 0xcd5b8b?}, {0x4000029470?, 0xcd6e4d?}}, {{0xcebeb2?, 0xe0f130?}, 0xd34b48?}, 0x4000189c20?) /app/backend/internal/service/email_service.go:115 +0x518 github.com/stonith404/pocket-id/backend/internal/service.(*AuditLogService).CreateNewSignInWithEmail.func1() /app/backend/internal/service/audit_log_service.go:67 +0x2d8 created by github.com/stonith404/pocket-id/backend/internal/service.(*AuditLogService).CreateNewSignInWithEmail in goroutine 46 /app/backend/internal/service/audit_log_service.go:63 +0x370 ```
OVERLORD added the bug label 2025-10-08 00:08:54 +03:00
Author
Owner

@renevo commented on GitHub:

Probably related to #75

@renevo commented on GitHub: Probably related to #75
Author
Owner

@stonith404 commented on GitHub:

Thanks for reporting. The issue was indeed that non TLS connections weren't handled correctly. This should be fixed in v0.18.0.

@stonith404 commented on GitHub: Thanks for reporting. The issue was indeed that non TLS connections weren't handled correctly. This should be fixed in `v0.18.0`.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/pocket-id-pocket-id-1#444