mirror of
https://github.com/SuiteCRM/SuiteCRM.git
synced 2026-03-02 19:16:58 -05:00
Outbound email password not saved correctly for long passwords like API keys #5242
Labels
No labels
Area: API
Area: Campaigns
Area: Cases
Area: Clean Up
Area: Clean Up: Performance
Area: Dashlets
Area: Databases
Area: Developer Tools
Area: Elasticsearch
Area: Elasticsearch
Area: Emails
Area: Emails:Campaigns
Area: Emails:Cases
Area: Emails:Compose
Area: Emails:Config
Area: Emails:Templates
Area: Environment
Area: Installation
Area: Language
Area: Mobile
Area: Module
Area: PDFs
Area: PHP8
Area: Reports
Area: Studio
Area: Styling
Area: Upgrading
Area: Workflow
Area:Activity Stream
Area:Calls
Area:Import
Area:Projects
Area:Search
Area:Surveys
Area:Themes
Area:Users
Branch:Hotfix
Good First Issue
Hacktoberfest
Help Wanted
PR:Community Contribution
PR:Type:Enhancement
Priority:Critical
Priority:Important
Priority:Moderate
Severity: Major
Severity: Minor
Severity: Moderate
Status: Requires Code Review
Status: Requires Updates
Status: Stale
Status: Team Investigating
Status:Assessed
Status:Fix Proposed
Status:Needs Assessed
Status:Requires Automated Tests
Type: Bug
Type:Deprecated
Type:Discussion
Type:Duplicate
Type:Invalid
Type:Question
Type:Suggestion
Type:Suggestion
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/SuiteCRM-SuiteCRM#5242
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 @ExcelsiorEyer on GitHub (Aug 21, 2024).
Issue
SMTP password for personal outgoing email is not being saved correctly if it is a long password like an API key. Adding debug steps to include/OutboundEmail/OutboundEmail.php seems to indicate that the stored encrypted password is being truncated to 100 chars, causing an incorrect password to be used for authenticating with the SMTP server
Version 7.14.5
Sugar Version 6.5.25 (Build 344)
Possible Fix
Increase the field length of outbound_email.mail_smtppass to a much larger value to allow for the encryption of API keys provided by SMTP providers
Steps to Reproduce the Issue
Context
No response
Version
7.14.5
What browser are you currently using?
Chrome
Browser Version
No response
Environment Information
MySQL, PHP8.2
Operating System and Version
Ubuntu
@chris001 commented on GitHub (Aug 22, 2024):
Unlike the username field
mail_smtpuserwhich hasmaxlength=100on the web form, this passwordmail_smtppassdoesn't have amaxlengthon the web form! So it misleads you into believing you can paste in an app password longer than 100 characters, because there is nomaxlength. Suite silently fails to save the full app password when the database truncates to the size of the field in the DB, resulting in first 100 characters saved, then SMTP Auth fails, and sending Outgoing Email fails.@ExcelsiorEyer commented on GitHub (Aug 24, 2024):
Just to clarify, in my case the actual password is short of 100 characters. So limiting the password to 100 characters on the front end will not solve the problem if the encrypted value were to exceed 100 characters in length.
@IAmBecomeDeth commented on GitHub (Mar 24, 2025):
This is still an issue in 8.8. I attempted to increase the size of varchar 100 to varchar 300 and there must be somewhere else, possibly in the encryption function?
Actually, I just tested my lengths. password bravo gives me for my api key (password) is 90 chars. after increasing varchar to 300, the saved password is 128 chars. before saving password, the test completes successfully. however, after you save, emails fail to send.