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.

allow_forgery_protection is false even in development environment by default

#4136

seems that recent commit 01f0e47663bbbc593af0c36d4cf49124b200e3d8 (Move request forgery protection configuration to the AC config object) is the offender.

config.request_forgery_protection_token ||= true
in
actionpack/lib/action_controller/metal/request_forgery_protection.rb
seems to work on a different @config, not on the ApplicationController::Base one. probably executed too late to be copied/inherited properly.

I've tried to fix it, but failed. Hope this message would help.

Reported by codesnik · March 9th, 2010 @ 10:38 AM

State: resolved
Milestone: 3.0.2
Assigned to: Carl Lerche Carl Lerche
Importance: Low

Activity

  1. Denis Odorcic
    Denis Odorcic
    • Tag changed from rails3 to csrf, patch, rails3, request-forgery-protection

    I've added a patch for this (and light rework to remove some duplicate code). This is also related to #4199 javascript TypeError with rails3 project (rails.js, line 2). allow_forgery_protection is always evaluating to false, which makes <%= csrf_meta_tag %> never generate anything, causing rails.js to log errors since it couldn't find the authenticity tags.

    March 19th, 2010 @ 03:36 AM

  2. Yehuda Katz (wycats)
    Yehuda Katz (wycats)
    • State changed from new to resolved
    • Milestone cleared.

    I think this is fixed in master? Please reopen if it's not.

    March 27th, 2010 @ 08:37 AM

  3. Rizwan Reza
    Rizwan Reza
    • Milestone cleared.
    • State changed from resolved to new

    Just confirmed it, it's resolved in master.

    March 27th, 2010 @ 08:46 AM

  4. Yehuda Katz (wycats)
    Yehuda Katz (wycats)
    • State changed from new to resolved
    • Milestone cleared.

    March 27th, 2010 @ 08:48 AM

  5. Jeremy Kemper
    Jeremy Kemper
    • Milestone set to 3.0.2
    • Importance changed from to Low

    October 15th, 2010 @ 11:01 PM

  6. Ryan Bigg
    Ryan Bigg
    • Tag cleared.

    Automatic cleanup of spam.

    November 8th, 2010 @ 01:50 AM