Skip to content

stmp-send-message fails authentication with long sender/sender/password #172

racket-bug-submit opened this Issue Mar 16, 2012 · 1 comment

1 participant

Originally submitted by John Griffin on: Thu Jan 19 19:36:01 -0500 2012

stmp-send-message failed to connect on one gmail account while working fine for two others. The problem is around line 100 of smtp.rkt where a base64-encode does a line break at 72 characters on the one account which happens to be long enough to expose a symptom (authentication failure). The two functioning email accounts happen to be shorter strings. Whether using a regex-replace* is better than using (base64-encode-stream in out #"") seemed a toss up. My fix is below for someone to review.

(when auth-user
(log "auth\n")
(fprintf w "AUTH PLAIN ~a\r\n"
;; Encoding adds CRLF

(format "~a\0~a\0~a" auth-user auth-user auth-passwd))) ""))
(check-reply r 235 w))

Steps to Reproduce:
; When using a SENDER PASSWORD combination whose base64
; encoding of SENDER\0SENDER\0PASSWORD is longer than 72 bytes.

           (list recipient)
           (insert-field "Subject" subject
    (insert-field "To" recipient empty-header))
       (regexp-split #px"\n" message-text)
           #:port-no 465
           #:tcp-connect ssl-connect
           #:auth-user SENDER
           #:auth-passwd PASSWORD)
macosx "Darwin JGiMac24.local 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun  7 16:33:36 PDT
 2011; root:xnu-1504.15.3~1/RELEASE_I386 i386 i386" (i386-macosx/3m) (get-display-depth) =
Human Language: english
(current-memory-use) 225617472
Links: (links) = ("cumulus"); (links #:user? #f) = (); (links #:root? #t) = (); (links
 #:user? #f #:root? #t) = ()

 ("2htdp" "algol60" "at-exp" "browser" "combinator-parser" "compiler" "config" "data"
 "datalog" "db" "defaults" "deinprogramm" "drracket" "drscheme" "dynext" "embedded-gui"
 "eopl" "errortrace" "ffi" "file" "framework" "frtime" "games" "graphics" "gui-debugger"
 "guibuilder" "handin-client" "handin-server" "help" "hierlist" "honu" "htdp" "html"
 "icons" "images" "info-domain" "lang" "launcher" "lazy" "macro-debugger" "make" "meta"
 "mred" "mrlib" "mysterx" "mzcom" "mzlib" "mzscheme" "net" "openssl" "parser-tools"
 "picturing-programs" "plai" "planet" "plot" "preprocessor" "profile" "r5rs" "r6rs"
 "racket" "racklog" "rackunit" "raco" "reader" "readline" "redex" "repo-time-stamp" "rnrs"
 "s-exp" "scheme" "schemeunit" "scribble" "scribblings" "scriblib" "setup" "sgl" "sirmail"
 "slatex" "slideshow" "srfi" "stepper" "string-constants" "swindle" "syntax"
 "syntax-color" "teachpack" "test-box-recovery" "test-engine" "tests" "tex2page" "texpict"
 "trace" "typed" "typed-racket" "typed-scheme"!
  "unstable" "version" "web-server" "wxme" "xml" "xrepl"))

Computer Language: (("Determine language from source") (#(#t print mixed-fraction-e #f #t
 debug) (default) #() "#lang racket/base\n" #f #t))
This bug was converted from Gnats bug 12501.

[anon-submit; griffinish at gmail dot com]

On Tue, 21 Feb 2012 08:18:09 -0500, mflatt at racket-lang dot org wrote:

A commit by has resolved this report: b656219f8a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.