Project

General

Profile

Actions

Defect #26518

closed

Rails 5: Adding a block in My Page causes "Invalid form authenticity token."

Added by Go MAEDA almost 7 years ago. Updated almost 7 years ago.

Status:
Closed
Priority:
Normal
Category:
My page
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

Steps to reproduce:

1. Open "My Page".
2. Add an any block. You will see "Invalid form authenticity token."

development.log:

There is an error "Can't verify CSRF token authenticity".

Started POST "/my/add_block" for 127.0.0.1 at 2017-07-25 11:00:28 +0900
Processing by MyController#add_block as HTML
  Parameters: {"utf8"=>"✓", "block"=>"issuequery"}
Can't verify CSRF token authenticity.
  AnonymousUser Load (0.3ms)  SELECT  "users".* FROM "users" WHERE "users"."type" IN ('AnonymousUser') ORDER BY "users"."id" ASC LIMIT ?  [["LIMIT", 1]]
  Rendering common/error.html.erb within layouts/base
  Rendered common/error.html.erb within layouts/base (1.5ms)
Filter chain halted as :verify_authenticity_token rendered or redirected
Completed 422 Unprocessable Entity in 28ms (Views: 24.5ms | ActiveRecord: 0.3ms)

Files

diff.patch (487 Bytes) diff.patch Mizuki ISHIKAWA, 2017-07-25 04:39

Related issues

Related to Redmine - Feature #23630: Migrate to Rails 5.2ClosedJean-Philippe Lang

Actions
Related to Redmine - Patch #31205: Replace jquery-rails with vanilla javascript ujsClosedGo MAEDA

Actions
Actions

Also available in: Atom PDF