search for: form_authenticity_token

Displaying 15 results from an estimated 15 matches for "form_authenticity_token".

2014 May 03
0
Putting form_authenticity_token (csrf token) in a cookie instead of in meta tags?
...nd from them it constructs a hidden "authenticity_token" param from it. It gets inserted in with the POST data so Rails will accept the request. I would like to be able to serve identical HTML content for all users, so the page can be cached on Varnish or a CDN or whatever. Since the form_authenticity_token is different for every session, leaving csrf_meta_tags in the header makes it impossible for a proxy to cache the page. I have an idea for how to fix it but thought I would ask here, to see if people think there would be problems with it: I could create an after_action in ApplicationController...
2009 Sep 28
2
Error with flash and form_authenticity_token in new rails application with scaffolding
...ion_controller/session/abstract_store.rb:61:in `load!'' /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-2.3.4/lib/ action_controller/session/abstract_store.rb:28:in `[]'' /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-2.3.4/lib/ action_controller/request_forgery_protection.rb:102:in `form_authenticity_token'' (eval):2:in `form_authenticity_token'' /home/kashyap/Lab/sitara/app/views/resources/new.html.erb:3:in `_run_erb_app47views47resources47new46html46erb'' /home/kashyap/Lab/sitara/app/controllers/resources_controller.rb:29:in `new'' I bypass this by commenting out p...
2010 Sep 21
0
Upload form with uploadify jquery plugin
...g] max_size = 20.megabyte allow_multiple_files = true url = photos_path photo_field = ''#photo_photo'' %> <%- session_key_name = ActionController::Base.session_options[:key] -%> <% content_for :jstemplates do -%> <%= javascript_tag "window._token = ''#{form_authenticity_token}''" %> <%= javascript_include_tag "uploadify/swfobject" %> <%= javascript_include_tag "uploadify/jquery.uploadify.v2.1.0.min" %> <script type="text/javascript"> <% if protect_against_forgery? -%> var AUTH_TOKEN = ''<%=...
2008 Apr 09
3
form_tag and form_for cause #protect_from_forgery errors
...39;', ''student'', true %> Student</label> 5: <label><%= radio_button_tag ''user_type'', ''instructor'' %> Teacher</ label> vendor/rails/actionpack/lib/action_controller/ request_forgery_protection.rb:114:in `form_authenticity_token'' (eval):2:in `send'' (eval):2:in `form_authenticity_token'' vendor/rails/actionpack/lib/action_view/helpers/ form_tag_helper.rb:453:in `token_tag'' vendor/rails/actionpack/lib/action_view/helpers/ form_tag_helper.rb:430:in `extra_tags_for_form&...
2009 Aug 28
4
InvalidAuthenticityToken
Hi guys What does the below line says ActionController::InvalidAuthenticityToken (ActionController::InvalidAuthenticityToken): -e:2:in `load'' -e:2 Please guide me -- Karthik.k Mobile - +91-9894991640
2009 Oct 28
6
undefined method `^' for "e":String
...ction_controller/session/abstract_store.rb:61:in `load!'' /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-2.3.4/lib/action_controller/session/abstract_store.rb:28:in `[]'' /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-2.3.4/lib/action_controller/request_forgery_protection.rb:102:in `form_authenticity_token'' (eval):2:in `form_authenticity_token'' /Users/username/Sites/Ruby/sample2/app/views/pages/new.html.erb:3:in `_run_erb_app47views47pages47new46html46erb'' /Users/username/Sites/Ruby/sample2/app/controllers/pages_controller.rb:29:in `new'' I read another post on her...
2008 Jan 30
2
Invalid authenticity tokens when using subdomains
Does anyone have experience with using subdomains and rails? The example that I used to help me out was from the Advanced Rails Recipes book, but I can''t get it working as it should. I continually get authenticity token errors after logging in. I have had this error before, and for whatever reason after I added a<%= token_tag %> to the form it worked, but it doesn''t work
2008 Jan 30
1
token_tag in Flash?
Yo, I''ve got this data POSTing from a Flash App and I need to figure out how this little <%= token_tag %> works so I can give the Flash the proper validation. See, I get this ActionController::InvalidAuthenticityToken because you know, gotta defend those POSTs, but how do I get the toke into my Flash? I''m somewhat new, so if there is some way obvious easier way then let
2007 Oct 03
2
active_record_store sessions does not pass a :secret to #protect_from_forgery in Rails 2.0.0 Preview
...<p> 7: <b>Name</b><br /> 8: <%= f.text_field :name %> RAILS_ROOT: C:/www/rails_apps/myapp Application Trace | Framework Trace | Full Trace c:/www/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3.7707/lib/ action_controller/request_forgery_protection.rb:101:in `form_authenticity_token'' (eval):2:in `send'' (eval):2:in `form_authenticity_token'' app/views/pages/edit.html.erb:5:in `_run_erb_47app47views47pages47edit46html46erb'' Do I need to do something else besides create the database table and uncomment the line in config/environment.rb? --~-...
2008 Nov 30
6
ActionController::InvalidAuthenticityToken?
Hi- I am trying to use AJAX calls to login and logout of my Rails app so that the form renders in the side bar when you are not logged in, and your "profile" renders if you are. It all works, but when you logout, and try and log back in, you get "ActionController::InvalidAuthenticityToken", in the development.log. What does this mean, I can''t figure out how to fix
2008 Jul 29
0
Re: InvalidAuthenticityToken with Lightview
...er > I use that option, I get the dreaded InvalidAuthenticityToken error. > > Do any ideas come to mind? Add this in the <head> section of your main layout file: <script type="text/javascript" charset="utf-8"> window._token = ''<%= form_authenticity_token -%>''; </script> Add this on top of your /javascripts/application.js file: Ajax.Base.prototype.initialize = Ajax.Base.prototype.initialize.wrap( function(p, options){ p(options); this.options.parameters = this.options.parameters || {}; this.options.paramete...
2010 Sep 09
1
406 Not Acceptable with swfupload
...ialog_complete_handler : fileDialogComplete, upload_progress_handler : uploadProgress, upload_error_handler : uploadError, upload_success_handler : uploadSuccess, upload_complete_handler : uploadComplete, post_params : { authenticity_token : ''<%= u form_authenticity_token -%>'', }, custom_settings : { upload_target : ''divFileProgressContainer'', }, debug: false }); }; </script> <div style="margin: 0px 10px;"> <div> <% form_for(@asset) do |f| %> <fi...
2008 Jun 15
11
[PATCH] helper to create fb css stylized table
I attached a rails helper implementation of the fb_table described here: http://wiki.developers.facebook.com/index.php/Facebook_Styles I included testing and comments. I hope you find it useful. Curiously, it''s really a small extension of FBML. Richard -------------- next part -------------- Index: test/rails_integration_test.rb
2008 Oct 10
17
authenticity_token sent, still InvalidAuthenticityToken
Hi! To send the authenticity token from flex back to the server, I followed this: http://blog.dt.org/index.php/2008/06/rails-2-flex-3-and-form-authenticity-tokens/ I have two controllers in my rails app. The method described in the link above works with the actions in one controller, but does not work with the other. The controller which does not work has just one action which performs a file
2008 Dec 06
9
jQuery Rails Functions
Hi, I was wondering if anybody who used jQuery with rails could help me out. I have a droppable that fires a simple function, shown below: $("#list").droppable({ accept: ".item", hoverClass: ''droppable-hover'', drop: function(ev, ui) { $(this).append("<br>Dropped!"); } }); But how could I get this to fire a Rails funciton in the