Loading...
 
Skip to main content

Profile preview fails with ugly CSRF error

Status
Closed
Subject
Profile preview fails with ugly CSRF error
Version
19.x
Category
  • Error
  • Regression
Feature
Installer (profiles, upgrades and server-related issues)
Profile Manager
Resolution status
Fixed or Solved
Submitted by
luci
Volunteered to solve
rjsmelo, Jorge Sá Pereira, lindon
Lastmod by
luci, Marc Laporte, rjsmelo, lindon
Rating
(0)
Related-to
Description

Clicking the "Preview Changes" button to preview a profile in trunk fails with some badly broken full-tiki page in modal content and a CSRF error message in it:
Image

Files
  1. Screen Shot 2017 11 13 At 13.24.00
Solution

In r68090 was added a new feature to force the generation of new CSRF tokens, for the cases (like this) where there are multiple actions in the same interface and they can be executed using AJAX (consuming the tokens).

Also, each of the actions is getting a new token.

There will still be an issue as each of the tokens is "single use", you should not be able to run preview twice.

  • Actually, I should be able to run preview as many times as I wish 😉 Other ideas how to fix this?

*************
Update: should be fixed now with r68745. Tickets not needed for actions that do not change the database, like preview, export, find, etc. Also, should not use GET methods for tickets.

Importance
8
Easy to solve?
6
Priority
48
Demonstrate Bug on Tiki 19+
This bug has been demonstrated on show2.tiki.org
Demonstrate Bug (older Tiki versions)
Ticket ID
6760
Created
Thursday 23 August, 2018 14:35:47 UTC
by luci
LastModif
Saturday 06 July, 2024 10:21:44 UTC


Collapse/expand modules below
Show PHP error messages