Bumped by Community user
    Bumped by Community user
    Bumped by Community user
    Bumped by Community user
    Bumped by Community user
    Bumped by Community user
2 ofrmatting
source | link

In the VF page controller I am receiving the data in a page load method using ApexPages.currentPage().getParameters() and inserting the data in to one of the custom object. Every thing works fine. But when I posted my instance for CheckMarx security review it shows CSRF error for this page.

Checkmarx shows errors in the ** indicated lines..in page and controller.

VF Page:  

<apex:page controller="myclass" action ="{!fetch}"> **
</apex:page>

controller: public class myclass{ public void fetch(){ Map objfields = new map(); objfields =ApexPages.currentPage().getParameters();

custom1obj__c obj = new custom1obj__c(); //assign the objfields values to obj here insert obj; } }

public class myclass{
    public void fetch(){ **
        Map<string,string> objfields = new map<string,string>();
        objfields =ApexPages.currentPage().getParameters();

        custom1obj__c obj = new custom1obj__c();
        //assign the objfields values to obj here
        insert obj;
    }
}

Please help to solve this issue.

In the VF page controller I am receiving the data in a page load method using ApexPages.currentPage().getParameters() and inserting the data in to one of the custom object. Every thing works fine. But when I posted my instance for CheckMarx security review it shows CSRF error for this page.

Checkmarx shows errors in the ** indicated lines..in page and controller.

VF Page:  

controller: public class myclass{ public void fetch(){ Map objfields = new map(); objfields =ApexPages.currentPage().getParameters();

custom1obj__c obj = new custom1obj__c(); //assign the objfields values to obj here insert obj; } }

Please help to solve this issue.

In the VF page controller I am receiving the data in a page load method using ApexPages.currentPage().getParameters() and inserting the data in to one of the custom object. Every thing works fine. But when I posted my instance for CheckMarx security review it shows CSRF error for this page.

Checkmarx shows errors in the ** indicated lines..in page and controller.

VF Page:

<apex:page controller="myclass" action ="{!fetch}"> **
</apex:page>

controller:

public class myclass{
    public void fetch(){ **
        Map<string,string> objfields = new map<string,string>();
        objfields =ApexPages.currentPage().getParameters();

        custom1obj__c obj = new custom1obj__c();
        //assign the objfields values to obj here
        insert obj;
    }
}

Please help to solve this issue.

1
source | link

How to resolve Cross Site Request Forgery(CSRF) in salesforce?

In the VF page controller I am receiving the data in a page load method using ApexPages.currentPage().getParameters() and inserting the data in to one of the custom object. Every thing works fine. But when I posted my instance for CheckMarx security review it shows CSRF error for this page.

Checkmarx shows errors in the ** indicated lines..in page and controller.

VF Page:

controller: public class myclass{ public void fetch(){ Map objfields = new map(); objfields =ApexPages.currentPage().getParameters();

custom1obj__c obj = new custom1obj__c(); //assign the objfields values to obj here insert obj; } }

Please help to solve this issue.