From e6eab79fe9f57b2db79c9be4fb1018feb01fc3f7 Mon Sep 17 00:00:00 2001 From: Rich Megginson Date: Feb 28 2008 22:17:26 +0000 Subject: Resolves: bug 171353 Bug Description: Unable to download a certificate from Gateway/Phonebook Reviewed by: nkinder (Thanks!) Fix Description: The code expects the attribute to be encoded like this - attrname&mimetype&index. However, the code was outputtting the & as literal "&" chars. We need to output them encoded as %26 instead. With this fix, if I click on the Download Certificate link, and the certificate is a real email certificate (i.e. not a CA cert or a server cert or some other type of cert), Firefox 2 will silently install it under Other People's certificates in the certificate window. An attempt to use any other type of cert will silently fail. NOTE: If you actually want to use this cert in an email program, you should right click on the link and select Save Link As... to save the cert in a local file, then import that into your email program. Platforms tested: RHEL5 x86_64 Flag Day: no Doc impact: no --- diff --git a/entrydisplay.c b/entrydisplay.c index b049dc8..6baffc3 100644 --- a/entrydisplay.c +++ b/entrydisplay.c @@ -1042,9 +1042,9 @@ do_attribute( dsgwtmplinfo *tip, char *dn, unsigned long dispopts, * always reference first value for now ( "&0" ) unless returning * link to a vCard (in which case we leave the &0 off) */ - dsgw_emitf("%s\"%s%s&ldq=%s&%s%s\"%s\n", prefix, urlprefix, escapeddn, attr, + dsgw_emitf("%s\"%s%s&ldq=%s%%26%s%s\"%s\n", prefix, urlprefix, escapeddn, attr, ( mimetype == NULL ) ? "" : mimetype, - ( strcasecmp( "_vcard", attr ) == 0 ) ? "" : "&0", suffix ); + ( strcasecmp( "_vcard", attr ) == 0 ) ? "" : "%260", suffix ); free( urlprefix ); free( escapeddn ); return;