mirror of
https://github.com/vrana/adminer.git
synced 2026-02-25 16:11:26 +01:00
Allow connecting to IPv6 (fix #1095)
This commit is contained in:
@@ -25,7 +25,8 @@ if (isset($_GET["imap"])) {
|
||||
private $imap;
|
||||
|
||||
function attach($server, $username, $password): string {
|
||||
$this->mailbox = "{" . "$server:993/ssl}"; // Adminer disallows specifying privileged port in server name
|
||||
list($host, $port) = host_port($server);
|
||||
$this->mailbox = "{" . "$host:" . ($port ?: 993) . "/ssl}"; // Adminer disallows specifying privileged port in server name
|
||||
$this->imap = @imap_open($this->mailbox, $username, $password, OP_HALFOPEN, 1);
|
||||
return ($this->imap ? '' : imap_last_error());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user