Milton Keanes EscortsGirl With Oversized NipplesBig Boobed HosBras Panties ThongsBbw Mature OrgyStargate Dr Weir NakedCassandra Lynn Yellow BikiniHot Ebony Chick VideoStephen Lawrence Aged 10Natural Sexy Black NudesCurrent Midget ActorsMan Puts Head In Womans PussyMap Toad SuckMediserve Nursing AgencyEssential Fatty Acids And Atopic DermatitisIpswich Striper FishingEbony DommesModel Of Primary Health CareSoftcore Movies XxxIsland Hideaway Virgin IslandsWhy Mnscu SucksHammer Blow Corp TrailerSwimming Vaginal Itch PregnantThe Ikki Twins In PlayboyFemale Bodybuilder Porn ForumStrip HermioneStocking Fetish 2009 Jelsoft Enterprises LtdHiv Testing ForumJiffy Luibe BatteryArabian Amateur TgpBig Boob MaidUsaf Blue Suit UniformUbuntu Record Incoming WebcamGay Army FuckingShes Freaky Pitbull Mp3Big Boobed MexicansMisty Marie BondModel Dean TuckerThe Girls Next Door Playboy SpreadTiny Butt HoleSize Of A Bald EagleFree Uncut Cocks Huge AnalTeen SextopIncrediable AssFemale Genitourinary ExamTim Tivo GirlfriendAmy Adams Free Nude Picks38dd Female PicturesBreast Cancer Awareness Desktop WallpaperSapphic Erotica Hairy MoviesModel 50 Gerrard Record PlayerEnormus Cock AnalThe Mermaid Of Rainy Lake GpsAtlanta Excite Adult MagazineGrandmas Having Sex MoviesAirtel To Std Call Free TrickLovers StoriesUnder The Rainbow SexPersonal Pleasure With PillowGaleri LesbiennesCryotherapy Prostate CancerVintage Zippo Princeton UniversityAdult Novelty Shop IiMy Favorite Nude Boy PicsFunny Adult Cartoon GalleryBuffie The Body Sex TapeHentai Ass HoleSanaa Lathen Sex SceneOmega-3 Fatty Acid ContentElizabeth Berkeley Pussy PicsSexy Volleyball Shorts GalleriesMasterbation With Medical EquipmentAvs Hairless Young PussyBone Marrow Transplants For Hiv PatientClothespins SexCameron Diaz Nude PictureMrblacc SexyFeeding Barley To PoultryWhat Is Using My WebcamAmateur Facials ThumbnailsSomething Sexy Planet StoreKozy Collar Pluming Stack FlashingNursing School PopulationBlack Street NudityPlaylist For Adult DancesApril May AnalAdvanced Chat Rooms For TeensCalifornia Nurse AnesthesiaWhite Patches In ThroatNone Nude BoardEbony Godesses Squirting BukakkaeHades Wife PersephoneBaseball Loving PresidentMultiple Pole VibratorHillhaven Nursing HomeVintage Diamondback BikesCum Swallow ArchiveRussia Porn Big 02Petite Teens BjNew York Tivoli Pregnancy Portrait Photographer

Stupid Rails Mistakes: Caching and Authenticity Tokens

If you’re using anything other than fragment caching on pages with forms (and your fragment caching runs after your form blocks), then you’ll likely see Rails freakout on on the 2nd user that submits your cached form. The authenticity_token from the prior user has been cached and Rails is protecting you (I think). So, the moral is, don’t cache the auth_tokens (or find a clever way to workaround it).
Details and such on Rails 2.0 forgery protection.

Good presentation on Rails security

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

One Response to “Stupid Rails Mistakes: Caching and Authenticity Tokens”

  1. Prachi

    Thanks for this :)

    I was facing a similar problem. The most frustrating part was, the code worked without any glitches on my localhost. But on the demo server it threw an InvalidAuthenticityToken error. Didn’t realize the form (using the authenticity token) was being cached because in development.rb caching was set to false. Turning that on, errors began appearing.

    Anyway, don’t know if you will ever see this comment, it has been so long since you wrote this post. Had a good time feeding your fishes :)

Leave a Reply