From avodonosov at yandex.ru Thu Aug 22 02:24:02 2013 From: avodonosov at yandex.ru (Anton Vodonosov) Date: Thu, 22 Aug 2013 06:24:02 +0400 Subject: [cl-smtp-devel] bug: external-format is ignored when SSL is used Message-ID: <1310921377138242@web29d.yandex.ru> Hello. I've just hit a bug when used CL-SMPT - it failed to send a message with non-ascii characters over secure connection, despite the default :external-format :utf-8 is used. The reason is in the function cl-smtp::smtp-handshake. When SSL is used, the function throws away the original flexi-stream having correct external-forma and creates new flexi-stream, with hardcoded latin-1 external format. The attached patch fixes that by reusing the flexi-stream-external-format of the original flexi-stream when creating the new one. Best regards, - Anton -------------- next part -------------- A non-text attachment was scrubbed... Name: cvs.diff Type: application/octet-stream Size: 2081 bytes Desc: not available URL: From avodonosov at yandex.ru Thu Aug 22 13:18:45 2013 From: avodonosov at yandex.ru (Anton Vodonosov) Date: Thu, 22 Aug 2013 17:18:45 +0400 Subject: [cl-smtp-devel] bug: external-format is ignored when SSL is used In-Reply-To: <1377167928.24716.18.camel@ji-desktop> References: <1310921377138242@web29d.yandex.ru> <1377167928.24716.18.camel@ji-desktop> Message-ID: <26411377177525@web26h.yandex.ru> Hi Jan. I am using cl-smtp from the lates Quicklisp. Turns out the tarball included into quickisp is called cl-smtp-20101107-http, so probably it is not latest. 22.08.2013, 14:38, "Jan Idzikowski" : > Hello Anton, > > thanks for the patch, I will apply the patch. > > But I have a question, do you use the latest version of cl-smtp? > Since Version 20130118.1 cl-smtp check for non ascii characters in > message string and send message as quoted-printable. > > Best regards > Jan > > Am Donnerstag, den 22.08.2013, 06:24 +0400 schrieb Anton Vodonosov: > >> ?Hello. >> >> ?I've just hit a bug when used CL-SMPT - it failed >> ?to send a message with non-ascii characters >> ?over secure connection, despite the default >> ?:external-format :utf-8 is used. >> >> ?The reason is in the function cl-smtp::smtp-handshake. >> ?When SSL is used, the function throws away the original >> ?flexi-stream having correct external-forma and >> ?creates new flexi-stream, with hardcoded latin-1 external >> ?format. >> >> ?The attached patch fixes that by reusing the flexi-stream-external-format >> ?of the original flexi-stream when creating the new one. >> >> ?Best regards, >> ?- Anton From avodonosov at yandex.ru Fri Aug 23 00:05:22 2013 From: avodonosov at yandex.ru (Anton Vodonosov) Date: Fri, 23 Aug 2013 04:05:22 +0400 Subject: [cl-smtp-devel] bug: external-format is ignored when SSL is used In-Reply-To: <1377180053.24716.37.camel@ji-desktop> References: <1310921377138242@web29d.yandex.ru> <1377167928.24716.18.camel@ji-desktop> <26411377177525@web26h.yandex.ru> <1377180053.24716.37.camel@ji-desktop> Message-ID: <43101377216322@web28f.yandex.ru> I have just tried the latest cl-smtp - it does not have the encoding problem, so my patch is only necessary for the old version of cl-smtp. I will open an issue at Quicklisp to update cl-smtp. BTW, a string literal in the cl-smpt.lisp, the form (define-condition no-supported-authentication-method ...) contains a Tilde Newline construct. This breaks compilation on SBCL/Windows, because when you checkout from CVS, CVS converts Unix newline character to the Windows newline pair , and thus the Tile Newline becomes Tilea Return, which is unknown construct. SBCL reports an error: ; file: C:/Users/anton/projects/cl-smtp/cl-smtp.lisp ; in: DEFINE-CONDITION NO-SUPPORTED-AUTHENTICATION-METHOD ; (FORMAT STREAM ; "SMTP authentication has been requested, but the SMTP server did not advertise any ~ ; supported authentication scheme. Features announced: ~{~S~^, ~}" ; (CL-SMTP::FEATURES CONDITION)) ; ; caught ERROR: ; during macroexpansion of ; (FORMATTER ; "SMTP authentication has been requested, but the SMTP server did not advertise any ~ ; supported authentication scheme. Features announced: ~{~S~^, ~}"). ; Use *BREAK-ON-SIGNALS* to intercept. ; ; error in FORMAT: unknown directive (character: Return) ; SMTP authentication has been requested, but the SMTP server did not advertise any ~ ; supported authentication scheme. Features announced: ~{~S~^, ~} ; ^ ..; ; compilation unit aborted ; caught 1 fatal ERROR condition ; caught 1 ERROR condition 22.08.2013, 18:00, "Jan Idzikowski" : > Hi Anton, > > that is a old version, the version number is a date (YYYYMMDD), > so you can see your version is from november 2011. > I never used quicklisp, try clbuild. > > Am Donnerstag, den 22.08.2013, 17:18 +0400 schrieb Anton Vodonosov: > >> ?Hi Jan. >> >> ?I am using cl-smtp from the lates Quicklisp. >> ?Turns out the tarball included into quickisp is >> ?called cl-smtp-20101107-http, so probably it is not latest. >> >> ?22.08.2013, 14:38, "Jan Idzikowski" : >>> ?Hello Anton, >>> >>> ?thanks for the patch, I will apply the patch. >>> >>> ?But I have a question, do you use the latest version of cl-smtp? >>> ?Since Version 20130118.1 cl-smtp check for non ascii characters in >>> ?message string and send message as quoted-printable. >>> >>> ?Best regards >>> ?Jan >>> >>> ?Am Donnerstag, den 22.08.2013, 06:24 +0400 schrieb Anton Vodonosov: >>>> ??Hello. >>>> >>>> ??I've just hit a bug when used CL-SMPT - it failed >>>> ??to send a message with non-ascii characters >>>> ??over secure connection, despite the default >>>> ??:external-format :utf-8 is used. >>>> >>>> ??The reason is in the function cl-smtp::smtp-handshake. >>>> ??When SSL is used, the function throws away the original >>>> ??flexi-stream having correct external-forma and >>>> ??creates new flexi-stream, with hardcoded latin-1 external >>>> ??format. >>>> >>>> ??The attached patch fixes that by reusing the flexi-stream-external-format >>>> ??of the original flexi-stream when creating the new one. >>>> >>>> ??Best regards, >>>> ??- Anton From jan.idzikowski at knowledgetools.de Thu Aug 22 10:38:48 2013 From: jan.idzikowski at knowledgetools.de (Jan Idzikowski) Date: Thu, 22 Aug 2013 12:38:48 +0200 Subject: [cl-smtp-devel] bug: external-format is ignored when SSL is used In-Reply-To: <1310921377138242@web29d.yandex.ru> References: <1310921377138242@web29d.yandex.ru> Message-ID: <1377167928.24716.18.camel@ji-desktop> Hello Anton, thanks for the patch, I will apply the patch. But I have a question, do you use the latest version of cl-smtp? Since Version 20130118.1 cl-smtp check for non ascii characters in message string and send message as quoted-printable. Best regards Jan Am Donnerstag, den 22.08.2013, 06:24 +0400 schrieb Anton Vodonosov: > Hello. > > I've just hit a bug when used CL-SMPT - it failed > to send a message with non-ascii characters > over secure connection, despite the default > :external-format :utf-8 is used. > > The reason is in the function cl-smtp::smtp-handshake. > When SSL is used, the function throws away the original > flexi-stream having correct external-forma and > creates new flexi-stream, with hardcoded latin-1 external > format. > > The attached patch fixes that by reusing the flexi-stream-external-format > of the original flexi-stream when creating the new one. > > Best regards, > - Anton From avodonosov at yandex.ru Fri Aug 23 00:07:16 2013 From: avodonosov at yandex.ru (Anton Vodonosov) Date: Fri, 23 Aug 2013 04:07:16 +0400 Subject: [cl-smtp-devel] bug: external-format is ignored when SSL is used In-Reply-To: <43101377216322@web28f.yandex.ru> References: <1310921377138242@web29d.yandex.ru> <1377167928.24716.18.camel@ji-desktop> <26411377177525@web26h.yandex.ru> <1377180053.24716.37.camel@ji-desktop> <43101377216322@web28f.yandex.ru> Message-ID: <43231377216436@web28f.yandex.ru> 23.08.2013, 04:05, "Anton Vodonosov" : > I will open an issue at Quicklisp to update cl-smtp. Here is the ticket: https://github.com/quicklisp/quicklisp-projects/issues/549 There is no tarball published with new cl-smpt version. I assume Quicklisp should checkout the latest CVS when building new quicklisp dist versions? From jan.idzikowski at knowledgetools.de Thu Aug 22 14:00:53 2013 From: jan.idzikowski at knowledgetools.de (Jan Idzikowski) Date: Thu, 22 Aug 2013 16:00:53 +0200 Subject: [cl-smtp-devel] bug: external-format is ignored when SSL is used In-Reply-To: <26411377177525@web26h.yandex.ru> References: <1310921377138242@web29d.yandex.ru> <1377167928.24716.18.camel@ji-desktop> <26411377177525@web26h.yandex.ru> Message-ID: <1377180053.24716.37.camel@ji-desktop> Hi Anton, that is a old version, the version number is a date (YYYYMMDD), so you can see your version is from november 2011. I never used quicklisp, try clbuild. Am Donnerstag, den 22.08.2013, 17:18 +0400 schrieb Anton Vodonosov: > Hi Jan. > > I am using cl-smtp from the lates Quicklisp. > Turns out the tarball included into quickisp is > called cl-smtp-20101107-http, so probably it is not latest. > > 22.08.2013, 14:38, "Jan Idzikowski" : > > Hello Anton, > > > > thanks for the patch, I will apply the patch. > > > > But I have a question, do you use the latest version of cl-smtp? > > Since Version 20130118.1 cl-smtp check for non ascii characters in > > message string and send message as quoted-printable. > > > > Best regards > > Jan > > > > Am Donnerstag, den 22.08.2013, 06:24 +0400 schrieb Anton Vodonosov: > > > >> Hello. > >> > >> I've just hit a bug when used CL-SMPT - it failed > >> to send a message with non-ascii characters > >> over secure connection, despite the default > >> :external-format :utf-8 is used. > >> > >> The reason is in the function cl-smtp::smtp-handshake. > >> When SSL is used, the function throws away the original > >> flexi-stream having correct external-forma and > >> creates new flexi-stream, with hardcoded latin-1 external > >> format. > >> > >> The attached patch fixes that by reusing the flexi-stream-external-format > >> of the original flexi-stream when creating the new one. > >> > >> Best regards, > >> - Anton