Skip to content

Commit

Permalink
Don't enable GSSAPI method if principal is not set #81 (#82)
Browse files Browse the repository at this point in the history
  • Loading branch information
schengawegga authored Apr 14, 2024
1 parent c8c4c2b commit 7aa40a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Net/SMTP.php
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ public function __construct($host = null, $port = null, $localhost = null,
$this->gssapi_cname = $gssapi_cname;

/* If PHP krb5 extension is loaded, we enable GSSAPI method. */
if (extension_loaded('krb5')) {
if (isset($gssapi_principal) && extension_loaded('krb5')) {
$this->setAuthMethod('GSSAPI', array($this, 'authGSSAPI'));
}

Expand Down

0 comments on commit 7aa40a6

Please sign in to comment.