Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[7.x] Added check to avoid endless loop in MailManager::createTransport #32549

Merged
merged 5 commits into from
Apr 26, 2020

Conversation

duxthefux
Copy link
Contributor

When upgrading to Laravel 7 I found out that a misconfiguration of the new mail.mailers.* config can lead to an endless loop in MailManager::createTransport() which is caused by an empty transport-key in mail.mailers.{ANY_MAILER}.

This happed to us when we were migrating or multi-tenant SMTP configuration to new mailers pattern and as we used driver instead of transport in the configuration ran into a memory overflow due to the described endless loop.

This MR adds a check, as well as tests for it, to ensure that transport-key in $config in MailManager::createTransport() is not empty, where not empty means unequal to null, "" and " ".

This MR points the user to the right place of misconfiguration and does not break any existing features.

@GrahamCampbell GrahamCampbell changed the title Added check to avoid endless loop in MailManager::createTransport [7.x] Added check to avoid endless loop in MailManager::createTransport Apr 26, 2020
@taylorotwell taylorotwell merged commit 9666b31 into laravel:7.x Apr 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants