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

Ticket #8649 (closed defect: fixed)

Opened 1 year ago

Last modified 10 months ago

Flash messages vanishing in integration tests

Reported by: rundeks Assigned to: core
Priority: normal Milestone: 2.x
Component: Plugins Version: 1.2.3
Severity: normal Keywords: ssl requirement, verified
Cc:

Description

When using the SSL_REQUIREMENT plug in and doing an integration test flash messages vanish when a request is redirected from HTTP to HTTPS or vice versa. It appears to be how the integration tests are working the the filter created by SSL_REQUIREMENT plug in. It seems like this is not specific to SSL_REQUIREMENT, but I don't have an easy way to test.

Attachments

flashtest.zip (90.8 kB) - added by rundeks on 06/15/07 01:54:54.
Test project
flash_preservation.diff (2.4 kB) - added by fogle on 01/22/08 16:36:45.

Change History

06/14/07 06:21:58 changed by bitsweat

  • keywords set to ssl requirement.
  • resolution set to worksforme.
  • status changed from new to closed.
  • component changed from Web to Plugins.

06/15/07 01:54:54 changed by rundeks

  • attachment flashtest.zip added.

Test project

06/15/07 01:58:02 changed by rundeks

  • status changed from closed to reopened.
  • resolution deleted.

I created a basic test to see if something was wrong with my setup and I am still seeing this issue. I've attached the basic test that shows this. Look at: /test/integration/foo_test.rb

01/22/08 16:36:45 changed by fogle

  • attachment flash_preservation.diff added.

01/22/08 16:43:47 changed by fogle

I have attached a patch that fixes this problem. I had the problem in rails 2.0.2. I don't believe it is version specific.

ssl_requirement was not preserving the flash when it redirected.

ex: A user updates their password, which requires ssl. The update action sets a flash[:notice]. The update action redirects to a page which does not require ssl. The other page redirects out of ssl. This request consumes the flash. The non-ssl page does not have access to the flash[:notice].

The solution is for ssl_requirement to call flash.keep when redirecting.

01/23/08 02:38:32 changed by zdennis

+1 for this patch

01/24/08 04:22:20 changed by lotswholetime

+1

01/24/08 18:04:47 changed by rundeks

+1

01/24/08 20:28:41 changed by fogle

  • keywords changed from ssl requirement to ssl requirement Verified.

01/24/08 20:30:11 changed by fogle

  • keywords changed from ssl requirement Verified to ssl requirement, verified.

02/02/08 05:16:57 changed by bitsweat

  • status changed from reopened to closed.
  • resolution set to fixed.

(In [8780]) SSL requirement plugin keeps flash when it redirects. Closes #8649 [rundeks, fogle]