This project is archived and is in readonly mode.

#1965 ✓committed
MOROHASHI Kyosuke

Ruby 1.9 compat: escape expected cookie value on test

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

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 "="?

Comments and changes to this ticket

  • MOROHASHI Kyosuke

    MOROHASHI Kyosuke February 14th, 2009 @ 10:36 AM

    • Title changed from “escape expected cookie value on test” to “Ruby 1.9 compat: escape expected cookie value on test”
  • CancelProfileIsBroken

    CancelProfileIsBroken February 14th, 2009 @ 11:21 AM

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

  • CancelProfileIsBroken

    CancelProfileIsBroken February 14th, 2009 @ 11:23 AM

    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

  • Pratik

    Pratik February 15th, 2009 @ 12:30 AM

    • Assigned user set to “Jeremy Kemper”
  • Pratik

    Pratik February 16th, 2009 @ 07:29 PM

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

    Repository February 22nd, 2009 @ 05:12 AM

    • State changed from “new” to “committed”

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

    Ruby 1.9 compat for test.

    [#1965 state:committed]

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

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Attachments

Referenced by

Pages