function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
vasu takasivasu takasi 

Security Issues in Package posting

hi i have getting security issues regarding


""returnUrl = apexpages.currentpage().getparameters().get('returnUrl');""




""pagereference p = new pagereference(returnUrl); 
      return p;""


in the following class.

Please solve this issue.




public with sharing class classexample {  

   public classexample()


         c= new contact(); 

         paramMap = apexpages.currentpage().getparameters();    

           list1 = new List<String>(paramMap.keySet());    

      for(integer i=0;i<list1.size();i++){     

          paramName = list1.get(i);

              paramValue = paramMap.get(paramName);      

         if(paramName != 'returnUrl' && paramName !='core.apexpages.devmode.url')






         returnUrl = apexpages.currentpage().getparameters().get('returnUrl'); 


public contact c;

public string lastname{get;set;}

public string firstname{get;set;}

public string paramName{get;set;}

public string paramValue{get;set;}

public List<String> list1{get;set;}

public  map<string,string> paramMap{get;set;}

public  string returnUrl;      

    public pagereference autorun()




            insert c;    




             pagereference p = new pagereference(returnUrl);


     return p;       



     return null;     


             }   }