-
Notifications
You must be signed in to change notification settings - Fork 71
WIP: Default to STARTTLS #140
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -85,12 +85,19 @@ public function checkPassword($uid, $password) { | |
| $groups[] = $pieces[1]; | ||
| } | ||
|
|
||
| $protocol = ($this->sslmode === "ssl") ? "imaps" : "imap"; | ||
| $url = "{$protocol}://{$this->mailbox}:{$this->port}"; | ||
| $ch = curl_init(); | ||
| if ($this->sslmode === 'tls') { | ||
| curl_setopt($ch, CURLOPT_USE_SSL, CURLUSESSL_ALL); | ||
|
|
||
| if ($this->sslmode !== 'tls') { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. shouldn't people with |
||
| $protocol = 'imaps'; | ||
| // Use STARTTLS as default encryption mode | ||
| if ($this->sslmode) { | ||
| curl_setopt($ch, CURLOPT_USE_SSL, CURLUSESSL_ALL); | ||
| } | ||
| } else { | ||
| $protocol = 'imaps'; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you set the |
||
| } | ||
|
|
||
| $url = "{$protocol}://{$this->mailbox}:{$this->port}"; | ||
| curl_setopt($ch, CURLOPT_URL, $url); | ||
| curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); | ||
| curl_setopt($ch, CURLOPT_USERPWD, $username.":".$password); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe a simpler solution: how about just changing this line to include everything expect:
ssl(and also TRUE),nossl,notls, maybe "empty string" (and also FALSE)so everything else (including
tls) would be handled as STARTTLS...what do you think?