ruby-changes:28666
From: usa <ko1@a...>
Date: Tue, 14 May 2013 11:36:59 +0900 (JST)
Subject: [ruby-changes:28666] usa:r40718 (ruby_1_9_3): merge revision(s) 40419: [Backport #8281]
usa 2013-05-14 11:36:47 +0900 (Tue, 14 May 2013) New Revision: 40718 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=40718 Log: merge revision(s) 40419: [Backport #8281] * lib/net/imap.rb (getacl_response): parse the mailbox of an ACL response correctly. [ruby-core:54365] [Bug #8281] Modified directories: branches/ruby_1_9_3/ Modified files: branches/ruby_1_9_3/ChangeLog branches/ruby_1_9_3/lib/net/imap.rb branches/ruby_1_9_3/test/net/imap/test_imap_response_parser.rb branches/ruby_1_9_3/version.h Index: ruby_1_9_3/ChangeLog =================================================================== --- ruby_1_9_3/ChangeLog (revision 40717) +++ ruby_1_9_3/ChangeLog (revision 40718) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ruby_1_9_3/ChangeLog#L1 +Tue May 14 11:36:22 2013 Shugo Maeda <shugo@r...> + + * lib/net/imap.rb (getacl_response): parse the mailbox of an ACL + response correctly. [ruby-core:54365] [Bug #8281] + Tue May 14 11:24:22 2013 Martin Bosslet <Martin.Bosslet@g...> * ext/openssl/ossl_ssl.c: Correct shutdown behavior w.r.t GC. Index: ruby_1_9_3/lib/net/imap.rb =================================================================== --- ruby_1_9_3/lib/net/imap.rb (revision 40717) +++ ruby_1_9_3/lib/net/imap.rb (revision 40718) @@ -1725,7 +1725,7 @@ module Net https://github.com/ruby/ruby/blob/trunk/ruby_1_9_3/lib/net/imap.rb#L1725 # rights:: The access rights the indicated user has to the # mailbox. # - MailboxACLItem = Struct.new(:user, :rights) + MailboxACLItem = Struct.new(:user, :rights, :mailbox) # Net::IMAP::StatusData represents contents of the STATUS response. # @@ -2722,6 +2722,7 @@ module Net https://github.com/ruby/ruby/blob/trunk/ruby_1_9_3/lib/net/imap.rb#L2722 token = match(T_ATOM) name = token.value.upcase match(T_SPACE) + mailbox = astring data = [] token = lookahead if token.symbol == T_SPACE @@ -2737,8 +2738,7 @@ module Net https://github.com/ruby/ruby/blob/trunk/ruby_1_9_3/lib/net/imap.rb#L2738 user = astring match(T_SPACE) rights = astring - ##XXX data.push([user, rights]) - data.push(MailboxACLItem.new(user, rights)) + data.push(MailboxACLItem.new(user, rights, mailbox)) end end return UntaggedResponse.new(name, data, @str) Index: ruby_1_9_3/version.h =================================================================== --- ruby_1_9_3/version.h (revision 40717) +++ ruby_1_9_3/version.h (revision 40718) @@ -1,5 +1,5 @@ https://github.com/ruby/ruby/blob/trunk/ruby_1_9_3/version.h#L1 #define RUBY_VERSION "1.9.3" -#define RUBY_PATCHLEVEL 421 +#define RUBY_PATCHLEVEL 422 #define RUBY_RELEASE_DATE "2013-05-14" #define RUBY_RELEASE_YEAR 2013 Index: ruby_1_9_3/test/net/imap/test_imap_response_parser.rb =================================================================== --- ruby_1_9_3/test/net/imap/test_imap_response_parser.rb (revision 40717) +++ ruby_1_9_3/test/net/imap/test_imap_response_parser.rb (revision 40718) @@ -116,4 +116,18 @@ EOF https://github.com/ruby/ruby/blob/trunk/ruby_1_9_3/test/net/imap/test_imap_response_parser.rb#L116 * 1 FETCH (UID 92285 ) EOF end + + # [Bug #8281] + def test_acl + parser = Net::IMAP::ResponseParser.new + response = parser.parse(<<EOF.gsub(/\n/, "\r\n").taint) +* ACL "INBOX/share" "imshare2copy1366146467@x..." lrswickxteda +EOF + assert_equal("ACL", response.name) + assert_equal(1, response.data.length) + assert_equal("INBOX/share", response.data[0].mailbox) + assert_equal("imshare2copy1366146467@x...", + response.data[0].user) + assert_equal("lrswickxteda", response.data[0].rights) + end end Property changes on: ruby_1_9_3 ___________________________________________________________________ Modified: svn:mergeinfo Merged /trunk:r40419 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/