ejschmitt / delayed_job_web

Resque like web interface for delayed job
MIT License
478 stars 189 forks source link

Fix Rails session problems #62

Closed toolmantim closed 10 years ago

toolmantim commented 10 years ago

This fixes problems introduced in #57 which added CSRF protection

An isolated example which causes NoMethodError: undefined methodeach' for #inrack-1.5.2/lib/rack/session/abstract/id.rb in stringify_keys line: 158`:

require "action_controller/railtie"
require "logger"
require "sinatra/base"

class SinatraApp < Sinatra::Base
  enable :sessions # Disabling this will make everything AOK

  get "/" do
    "Hello"
  end
end

class RailsApp < Rails::Application
  config.logger = Rails.logger = Logger.new(STDOUT)
  config.secret_key_base = "foo"

  routes.draw do
    get "/" => SinatraApp
  end
end

run RailsApp

Fixes #41. Fixes #59.

Still no tests in this gem :(

alex88 commented 10 years ago

:+1: please merge!

spint commented 10 years ago

I had this issue too in a Rails 4.0.4 project, your fix-rails-session branch works fine, thanks !

andyatkinson commented 10 years ago

@toolmantim We should add some tests this week, but I'll merge for now since you and @spint have said it fixes the issue in manual verification.

andyatkinson commented 10 years ago

@toolmantim @alex88 @spint This was merge and a new gem build was pushed to rubygems. @toolmantim rake release github authentication fails for me (but not regular git pushes), I'll try to figure that out later.

toolmantim commented 10 years ago

:+1: