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
Viacheslau Pautaran 17Viacheslau Pautaran 17 

Understand SOQL Injection trailhead is not working properly

Hello all,

I'm trying to complete Understand SOQL Injection trailhead and getting right result, but I cannot complete the challenge.

Simulate a SOQL Injection Attack

For this challenge, perform a SOQL injection on the search box to see information that is unintentionally exposed. Navigate to the SOQL Injection Challenge tab within the SOQL Injection application. You will see a search tool for the supply__c object. Use the search box to perform a SOQL injection which returns supplies meant for Nobles only. Hint: If you’ve done this successfully, your query should return one result containing Venison.

I have 4 correct soultions for this:
%' and Nobles_only__c=true and name != '%123
%' and Nobles_only__c=true and name = '%
%' and Nobles_only__c=true and Storage_Location__r.Name != '%
%' and Nobles_only__c=true and Storage_Location__r.Castle__r.Name != '%

All of them are giving only one record containing Venison(what is the requirement). 

Can someone help me? What I'm doing wrong?

Thank you
Gerald douglasGerald douglas

I'm having exactly the same problem.

I've used:
%' and Nobles_only__c=true and name like '%

I've had a look at the code, and there seems to be a requirement for i<10.

Any help is much appreciated.
Jennifer LaneJennifer Lane
It's case sensitive - %' and Nobles_Only__c=true and name like '% (capital O) works.
 
Gerald douglasGerald douglas
Thanks so much Jennifer. Don't know how i missed it. Exactly what the problem was!
sunny absunny ab
Buy 100% Registered IELTS,TOEFL,GRE,GMAT,SAT,COUNTERFEIT BILLS,Passports,License,ID
Visa:Whatsapp:#(+27)73 675 2934
zhe zhuangzhe zhuang
Please try Venison%' and Storage_Location__r.Castle__r.Name like'%Wa
Pavlo ShchurPavlo Shchur
%' AND Nobles_Only__c = true AND Name LIKE '%

 
Joan BautistaJoan Bautista
Please Try ' and Nobles_Only__c = true and Name like '
Pranee TestPranee Test
This worked for me %%' and Nobles_Only__c=true and Name like '%%
PrathiiPrathii
Thanks Guys . This thread is very useful for beginner like me.
Linda Blum CHLinda Blum CH
%' and Nobles_Only__c = true AND name like '%    worked for me
anna wang 1anna wang 1
%' and Nobles_only__c=true and name = '%Venison

 
Shradha Mhaske 1Shradha Mhaske 1
Simulate a SOQL Injection Attack Trailhead Challenge
%' AND Nobles_Only__c = true AND Name LIKE '%

This will return one record containng name "vanison"