Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 1476

Show
Ignore:
Timestamp:
06/22/05 09:59:14 (3 years ago)
Author:
minam
Message:

Unquoted @ chars in received email headers are parsed properly in spite of RFC 822 (#1206)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/actionmailer/CHANGELOG

    r1447 r1476  
    11*SVN* 
     2 
     3* Unquoted @ characters in headers are now accepted in spite of RFC 822 #1206 
    24 
    35* Helper support (borrowed from ActionPack) 
  • trunk/actionmailer/lib/action_mailer/vendor/tmail/scanner_r.rb

    r4 r1476  
    2626 
    2727    alnum      = 'a-zA-Z0-9' 
    28     atomsyms   = %q[  _#!$%&`'*+-{|}~^/=?  ].strip 
    29     tokensyms  = %q[  _#!$%&`'*+-{|}~^.    ].strip 
     28    atomsyms   = %q[  _#!$%&`'*+-{|}~^@/=?  ].strip 
     29    tokensyms  = %q[  _#!$%&`'*+-{|}~^@.    ].strip 
    3030 
    3131    atomchars  = alnum + Regexp.quote(atomsyms) 
  • trunk/actionmailer/lib/action_mailer/vendor/tmail/utils.rb

    r1390 r1476  
    3737  module TextUtils 
    3838 
    39     aspecial     = '()<>[]:;.@\\,"' 
    40     tspecial     = '()<>[];:@\\,"/?=' 
     39    aspecial     = '()<>[]:;.\\,"' 
     40    tspecial     = '()<>[];:\\,"/?=' 
    4141    lwsp         = " \t\r\n" 
    4242    control      = '\x00-\x1f\x7f-\xff' 
  • trunk/actionmailer/test/mail_service_test.rb

    r1395 r1476  
    522522    assert_nothing_raised { mail.body } 
    523523  end 
     524 
     525  def test_decode_message_with_unquoted_atchar_in_header 
     526    fixture = File.read(File.dirname(__FILE__) + "/fixtures/raw_email11") 
     527    mail = TMail::Mail.parse(fixture) 
     528    assert_not_nil mail.from 
     529  end 
    524530end 
    525531