File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change
1
+ Sun May 25 03:33:53 2003 Minero Aoki <aamine@loveruby.net>
2
+
3
+ * lib/net/smtp.rb: support LOGIN authentication. Thanks to
4
+ Kazuhiko Izawa.
5
+
1
6
Tue May 20 00:45:40 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
2
7
3
8
* dir.c (push_braces): do not push_braces() unless rbrace is found.
Original file line number Diff line number Diff line change @@ -324,15 +324,21 @@ def ehlo( domain )
324
324
}
325
325
end
326
326
327
- # "PLAIN" authentication [RFC2554]
328
327
def auth_plain ( user , secret )
329
328
atomic {
330
329
getok sprintf ( 'AUTH PLAIN %s' ,
331
330
[ "\0 #{ user } \0 #{ secret } " ] . pack ( 'm' ) . chomp )
332
331
}
333
332
end
334
333
335
- # "CRAM-MD5" authentication [RFC2195]
334
+ def auth_login ( user , secret )
335
+ atomic {
336
+ getok ( "AUTH LOGIN" , ContinueCode )
337
+ getok ( [ user ] . pack ( 'm' ) . chomp , ContinueCode )
338
+ getok ( [ secret ] . pack ( 'm' ) . chomp )
339
+ }
340
+ end
341
+
336
342
def auth_cram_md5 ( user , secret )
337
343
atomic {
338
344
rep = getok ( 'AUTH CRAM-MD5' , ContinueCode )
You can’t perform that action at this time.
0 commit comments