Skip to main content
Mohindar saini (Inadev) 님이 #Apex에 질문했습니다
Isssue is, how to fix Insecure direct object references (IDORs) in SOQL list query i have marked in bold  list<Account> accountList

 

public PageReference ReturnLogin() {     

        Date dateDOB = null;

        String dateDOBString = null;

        if(String.isNotBlank(dob)) {

            dob = B_Common_Util.dateFormatConversion(dob);

            dob = String.escapeSingleQuotes(dob);

            String[] splitedDate_MDY = dob.split('/');// date is in DD/MM/YYYY format

            if(splitedDate_MDY.size() == 3){

                dateDOB = Date.newInstance(Integer.valueOf(splitedDate_MDY[2]), Integer.valueOf(splitedDate_MDY[1]),Integer.valueOf(splitedDate_MDY[0]));

                dateDOBString = splitedDate_MDY[2] + '-' + splitedDate_MDY[1] + '-' + splitedDate_MDY[0];

            }

        }

        isInactiveSite = false;

        if (SAN != null) {

            SAN = communitySANPrefix + SAN;

            list<Account> accountList = [Select id,Location_Status__c, Parent.CPF__c, Parent.CNPJ__c from Account where SAN__c =: SAN and RecordType.Name =: Brazil_Constants.ACCOUNT_RECORD_TYPE_LOCATION and ParentId != null];

            if (accountList != null && accountList.size() > 0) {

                Account locAcc = accountList[0];

                if(locAcc.Location_Status__c == NULL || locAcc.Location_Status__c == 'Pending' || locAcc.Location_Status__c == 'Canceled'){

                   
답변 1개
  1. 2022년 4월 14일 오전 7:35
    An insecure direct object reference (IDOR) is an access control vulnerability where unvalidated user input can be used for unauthorized access to resources or operations. IDORs can have serious consequences for cybersecurity and be hard to find yet easy to exploit. Here’s your pocket guide to insecure direct object references.
0/9000