Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Mailer] Fixed 'verify_peer' option in mailer DSN being ignored#37961

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
fabpot merged 1 commit intosymfony:5.1fromsnake-4:patch-1
Aug 31, 2020
Merged

[Mailer] Fixed 'verify_peer' option in mailer DSN being ignored#37961

fabpot merged 1 commit intosymfony:5.1fromsnake-4:patch-1
Aug 31, 2020

Conversation

@snake-4
Copy link
Contributor

QA
Branch?5.1
Bug fix?yes
New feature?no
Deprecations?no
TicketsN/A
LicenseMIT
Doc PRN/A

The mailer DSN option 'verify_peer' was being ignored because$dsn->getOption('verify_peer', true) was returning a string and thus NOT operator on it was always resulting in false. I propose changing the line where it is used with afilter_var call with theFILTER_VALIDATE_BOOLEAN as the filter parameter to overcome this issue.

Copy link
Member

@fabpotfabpot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Can you add a test case to cover this fix?

@snake-4
Copy link
ContributorAuthor

Can you add a test case to cover this fix?

I've added some test cases to cover this fix in my latest commit but I've also added a check to avoid disabling the verification for a DSN like thissmtps://:@example.com?verify_peer= because it could be misleading to disable it when it clearly doesn't have keywords like no, off or false and is just an empty string.

@nicolas-grekasnicolas-grekas added this to the5.1 milestoneAug 31, 2020
@fabpot
Copy link
Member

Thank you @SnakePin.

@fabpotfabpot merged commit0d99044 intosymfony:5.1Aug 31, 2020
@fabpotfabpot mentioned this pull requestSep 2, 2020
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@fabpotfabpotfabpot approved these changes

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

5.1

Development

Successfully merging this pull request may close these issues.

4 participants

@snake-4@fabpot@nicolas-grekas@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp