3

I am getting this error while opening visualforce page :

The link you followed isn’t valid. This page requires a CSRF confirmation token. Report this error to your Salesforce administrator.

This is VF code. What can be the issue ?

<apex:page  sidebar="true" showHeader="true" >
</apex:page>
2
  • <apex:page sidebar="true" showHeader="true" > </apex:page>
    – Piyush
    Commented May 4, 2015 at 5:34
  • is that your complete vf page code ? Commented May 4, 2015 at 5:43

2 Answers 2

2

believe you have enabled the Require CSRF protection on GET requests checkbox on the page.

if you uncheck this checkbox then the page should load fine.

Go to Setup -> Develop -> Pages -> select your page and edit it to remove this checkbox.

enter image description here

you can refer these salesforce articles for additional information on when and why this checkbox is used.

Defining Visualforce Pages

Secure Coding Cross Site Request Forgery

1

If you are experiencing the following error:

"The link you followed isn’t valid. This page requires a CSRF confirmation token. Report this error to your Salesforce administrator."

This is because the Visualforce Page you are navigating to has the metadata checkbox turned on: true

If you are looking to get your App Security Reviewed, you will need to enable these tokens for each Visualforce page you are navigating to through a web link.

We had a bit of a different pattern: Our weblinks were created as on click javascript To solve this, we have changed the for all the web links that were "on click javascript" to: url

Then in the body we ensure we are generating "well-formed URLs" using URLFOR.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .