Fix base64 encoding of tokens
authorSimo Sorce <simo@redhat.com>
Thu, 10 Apr 2014 04:52:39 +0000 (00:52 -0400)
committerSimo Sorce <simo@redhat.com>
Sat, 12 Apr 2014 22:18:38 +0000 (18:18 -0400)
The token was being trunkated as the total length should have been:
replen + 10

Just remove this line, apr_base64_encode() already properly terminate
the buffer.

src/mod_auth_gssapi.c

index 0cb548a..2045414 100644 (file)
@@ -268,7 +268,6 @@ done:
             if (reply) {
                 memcpy(reply, "Negotiate ", 10);
                 apr_base64_encode(&reply[10], output.value, output.length);
-                reply[replen] = '\0';
                 apr_table_add(req->err_headers_out,
                               "WWW-Authenticate", reply);
             }