Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Ruby 1.9 compat: escape expected cookie value on test

#1965

CookieStoreTest(actionpack/test/controller/session/cookie_store_test.rb) is broken on Ruby 1.9.1.

Ruby 1.8.7's marshaled data is too short not to contain '=' and test passes, but should the value(and test expect) be escaped "="?

Reported by MOROHASHI Kyosuke · February 14th, 2009 @ 02:18 AM

State: committed
Milestone: none
Assigned to: Jeremy Kemper Jeremy Kemper
Importance: none

Activity

  1. MOROHASHI Kyosuke
    MOROHASHI Kyosuke
    • Title changed from escape expected cookie value on test to Ruby 1.9 compat: escape expected cookie value on test

    February 14th, 2009 @ 10:36 AM

  2. CancelProfileIsBroken
    CancelProfileIsBroken

    +1 on this. Fixes three of our remaining test failures under 1.9.1, doesn't break anything under 1.8.6.

    February 14th, 2009 @ 11:21 AM

  3. CancelProfileIsBroken
    CancelProfileIsBroken

    These are the fails I'm seeing before applying this patch, by the way. Note the escaping issues with "==" vs "%3D%3D":

    Name: test_session_store_with_expire_after(CookieStoreTest) Type: Failure Message: <"myapp_session=BAh7BzoIZm9vSSIIYmFyBjoNZW5jb2RpbmciDVVTLUFTQ0lJOg9zZXNzaW9uX2lkIiUzZmIyMmZlMjhkMTQ1NzllMDJkNGY0NmU0Y2RlNDNlOA==--d0b524b18ed7d6ddd61342936ccdb2cb134fa9dd; path=/; expires=Thu, 24-Apr-2008 05:00:00 GMT; HttpOnly"> expected but was <"myapp_session=BAh7BzoIZm9vSSIIYmFyBjoNZW5jb2RpbmciDVVTLUFTQ0lJOg9zZXNzaW9uX2lkIiUzZmIyMmZlMjhkMTQ1NzllMDJkNGY0NmU0Y2RlNDNlOA%3D%3D--d0b524b18ed7d6ddd61342936ccdb2cb134fa9dd; path=/; expires=Thu, 24-Apr-2008 05:00:00 GMT; HttpOnly">. /home/webadmin/.cruise/projects/rails_master_191/work/actionpack/test/controller/session/cookie_store_test.rb:212

    Name: test_setting_session_value(CookieStoreTest) Type: Failure Message: <"myapp_session=BAh7BzoPc2Vzc2lvbl9pZCIlODA2ZjVmZjc4Y2JkZmFiZTQ2NGRkNDJmNzVlNWJlNTM6CGZvb0kiCGJhcgY6DWVuY29kaW5nIg1VUy1BU0NJSQ==--9dd411276d267150e9381cc2fdac557120d4b716; path=/; HttpOnly"> expected but was <"myapp_session=BAh7BzoPc2Vzc2lvbl9pZCIlODA2ZjVmZjc4Y2JkZmFiZTQ2NGRkNDJmNzVlNWJlNTM6CGZvb0kiCGJhcgY6DWVuY29kaW5nIg1VUy1BU0NJSQ%3D%3D--9dd411276d267150e9381cc2fdac557120d4b716; path=/; HttpOnly">. /home/webadmin/.cruise/projects/rails_master_191/work/actionpack/test/controller/session/cookie_store_test.rb:99

    Name: test_setting_session_value_after_session_reset(CookieStoreTest) Type: Failure Message: <"myapp_session=BAh7BzoPc2Vzc2lvbl9pZCIlOTQ2NTVkYWE0MzMxYjAwMmYxYWEyMzcwNDJlOWUyOWU6CGZvb0kiCGJhcgY6DWVuY29kaW5nIg1VUy1BU0NJSQ==--e70998aac0174a74a7695043c5d31c5cc55bf499; path=/; HttpOnly"> expected but was <"myapp_session=BAh7BzoPc2Vzc2lvbl9pZCIlOTQ2NTVkYWE0MzMxYjAwMmYxYWEyMzcwNDJlOWUyOWU6CGZvb0kiCGJhcgY6DWVuY29kaW5nIg1VUy1BU0NJSQ%3D%3D--e70998aac0174a74a7695043c5d31c5cc55bf499; path=/; HttpOnly">. /home/webadmin/.cruise/projects/rails_master_191/work/actionpack/test/controller/session/cookie_store_test.rb:167

    February 14th, 2009 @ 11:23 AM

  4. Pratik
    Pratik
    • Assigned user set to Jeremy Kemper

    February 15th, 2009 @ 12:30 AM

  5. Pratik
    Pratik
    • Tag changed from 2.x, patch, ruby1.9 to 2.3, patch, ruby1.9
    • Milestone cleared.

    February 16th, 2009 @ 07:29 PM

  6. Repository
    Repository
    • State changed from new to committed

    (from [b6c8379834cb10564349967b08012b87d1f4fe0e]) Expected cookie value should also be escaped.

    Ruby 1.9 compat for test.

    [#1965 Ruby 1.9 compat: escape expected cookie value on test state:committed]

    Signed-off-by: Jeremy Kemper jeremy@bitsweat.net http://github.com/rails/rails/co...

    February 22nd, 2009 @ 05:12 AM