I have been trying to fix this URL Redirection Attack code block:
String url = '/' + oGenericObj.getDescribe().getKeyPrefix() + '/e';
if (strObject.equals('Quote')) {
url += '?oppid=' + System.currentPageReference().getParameters().get('oppid');
}
PageReference pEditReference = new PageReference(url);
The particular security scan error occurs for below lines:
url += '?oppid=' + System.currentPageReference().getParameters().get('oppid');
andPageReference pEditReference = new PageReference(url);
Kindly suggest some ways to solve the errors.