mirror of
https://github.com/cypht-org/cypht.git
synced 2026-04-25 04:56:03 +03:00
[GH-ISSUE #1466] 🐛 [Bug] submission (smtp) authentication with scram tries using imap AUTHENTICATE command instead of smtp AUTH command #661
Labels
No labels
2fa
I18N
PGP
Security
Security
account
advanced_search
advanced_search
announcement
api_login
authentication
awaiting feedback
blocker
bug
bug
bug
calendar
config
contacts
core
core
devops
docker
docs
duplicate
dynamic_login
enhancement
epic
feature
feeds
framework
github
github
gmail_contacts
good first issue
help wanted
history
history
imap
imap_folders
inline_message
installation
keyboard_shortcuts
keyboard_shortcuts
ldap_contacts
mobile
need-ssh-access
new module set
nux
pop3
profiles
pull-request
question
refactor
release
research
saved_searches
smtp
strategic
tags
tests
themes
website
wordpress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/cypht#661
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @mjl- on GitHub (Mar 9, 2025).
Original GitHub issue: https://github.com/cypht-org/cypht/issues/1466
Originally assigned to: @IrAlfred on GitHub.
🐛 Bug
I was setting up cypht 2.4.0 to test for interoperability with https://github.com/mjl-/mox. When adding a submission/smtp server for outgoing email, cypht tries to log in to check the credentials (presumably). It tries to pick SCRAM (which is good!). However, it tries to use command AUTHENTICATE on smtp, which does not exist in smtp. It does in IMAP. I suspect the SCRAM code is shared between IMAP and SMTP, but doesn't take this difference into account.
This is what the mox submission server is seeing:
github.com/cypht-org/cypht@1ead675272/modules/smtp/hm-smtp.php (L345)github.com/cypht-org/cypht@1ead675272/lib/scram.php (L51)Btw, if I'm reading the code right, the scram mechanisms are chosen in order from weakest to strongest. Is that intentional? See:
github.com/cypht-org/cypht@1ead675272/modules/smtp/hm-smtp.php (L122)github.com/cypht-org/cypht@1ead675272/modules/imap/hm-imap.php (L263)Version & Environment
Cypht 2.4.0 from docker.
Btw, I tried the daily docker image, but it didn't start up, I noticed errors around database migrations, so I quickly reverted to 2.4.0. I looked at the code, and it seems still present in the master branch.
@marclaporte commented on GitHub (Mar 9, 2025):
@Neustradamus @josaphatim
@Neustradamus commented on GitHub (Mar 9, 2025):
@mjl-: Happy to see your ticket about SCRAM :)
Please disable "CRAM-MD5" and "LOGIN" for a real security!
@Danelif, @josaphatim: Can you look this ticket?
Thanks @marclaporte for the ping ^^