aboutsummaryrefslogtreecommitdiffstats
path: root/imap.c
diff options
context:
space:
mode:
Diffstat (limited to 'imap.c')
-rw-r--r--imap.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/imap.c b/imap.c
index 0b39e1c2..101f4030 100644
--- a/imap.c
+++ b/imap.c
@@ -261,7 +261,14 @@ static int do_rfc1731(int sock, char *truename)
return result;
}
- /* this patch by Dan Root <dar@thekeep.org> solves an endianess problem. */
+ len = from64tobits(challenge1.cstr, buf1);
+ if (len < 0) {
+ report(stderr, _("could not decode initial BASE64 challenge\n"));
+ return PS_AUTHFAIL;
+ }
+
+ /* this patch by Dan Root <dar@thekeep.org> solves an endianess
+ * problem. */
{
char tmp[4];
@@ -269,12 +276,6 @@ static int do_rfc1731(int sock, char *truename)
memcpy(challenge1.cstr, tmp, sizeof(tmp));
}
- len = from64tobits(challenge1.cstr, buf1);
- if (len < 0) {
- report(stderr, _("could not decode initial BASE64 challenge\n"));
- return PS_AUTHFAIL;
- }
-
/* Client responds with a Kerberos ticket and an authenticator for
* the principal "imap.hostname@realm" where "hostname" is the
* first component of the host name of the server with all letters