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
gv007gv007 

How to fix System.currentPageReference().getParameters().get('objtype')

In one of my application security scanner show the following line have problem .how to fix this type of line in apex controller. 

System.currentPageReference().getParameters().get('ObjType')

robertflyrobertfly

Hi Gopi - Could you add more insight into what was identified and more code if possible?  If you're not comfortable sharing in a public forum, please send an email to securecloud [at] salesforce [dot] com.

 

Your feedback is appreciated.  We're working hard to get the results of the scanner as high in quality as possible.

 

thanks,

 -Robert

gv007gv007
Thanks Robert.
LaurentDelcLaurentDelc

Hi,

 

Could you please share your solution? I am hitting the same problem. I understand that directly displaying a request parameter on a VF page opens a XSS security breach but I don't see how getting a parameter value from APEX would.

 

Laurent

robertflyrobertfly

Just getting a parameter in Apex is not an issue.  Can you provide more context into what you are seeing?