Skip to content

Commit

Permalink
auth-type requires a username, so these are invalid examples
Browse files Browse the repository at this point in the history
  • Loading branch information
slusarz committed Aug 19, 2014
1 parent 4e112a1 commit 21aaff0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 34 deletions.
8 changes: 3 additions & 5 deletions framework/Imap_Client/lib/Horde/Imap/Client/Url.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,9 @@ public function __toString()

if (!is_null($this->username)) {
$url .= $this->username;
}

if (!is_null($this->auth)) {
$url .= ';AUTH=' . $this->auth . '@';
} elseif (!is_null($this->username)) {
if (!is_null($this->auth)) {
$url .= ';AUTH=' . $this->auth;
}
$url .= '@';
}

Expand Down
29 changes: 0 additions & 29 deletions framework/Imap_Client/test/Horde/Imap/Client/UrlParseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,35 +135,6 @@ public function testUrlsProvider()
'mailbox' => ''
)
),
array(
';AUTH=PLAIN@test.example.com/',
array(
'hostspec' => 'test.example.com',
'port' => 143,
'relative' => false,
'auth' => 'PLAIN',
'mailbox' => ''
)
),
array(
';AUTH=PLAIN@test.example.com:143/',
array(
'hostspec' => 'test.example.com',
'port' => 143,
'relative' => false,
'auth' => 'PLAIN',
'mailbox' => ''
)
),
array(
';AUTH=*@test.example.com:143/',
array(
'hostspec' => 'test.example.com',
'port' => 143,
'relative' => false,
'mailbox' => ''
)
),
array(
'testuser;AUTH=*@test.example.com:143/',
array(
Expand Down

0 comments on commit 21aaff0

Please sign in to comment.