[๐] A possible bug when solving the challenge "Expired Coupon"
See original GitHub issue๐ Bug report
Description
Hello! I`ve found a bug when solving the โExpired Couponโ in another way.
I found a way to bypass the date validation by using breakpoint and editing the โthis.clientdateโ in the console.
The discount worked, but the challenge didn`t solved.
Is this a regression?
IDKโฆ
๐ฌ Minimal Reproduction
I use the Juice Shop in Simplified Chinese, but I think these pictures would contain necessary infomation.
๐ฅ Exception or Error
No.
๐ณ Your Environment
Docker
Additional Information
Windows10, Firefox85.0.2, OWASP ZAP
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:9 (6 by maintainers)
Top Results From Across the Web
[ ๐ ] A possible bug when solving the challenge "Expired ...
I`ve found a bug when solving the "Expired Coupon" in another way. I found a way to bypass the date validation by using...
Read more >Expired Coupon (Improper Input Validation) - YouTube
Successfully redeem an expired campaign coupon code.๐คด Credits to Bjoern Kimminich for providing this excellent vulnerable web app.
Read more >Best Apps for Students Taking a Break - Top Coupons & Promo ...
AppGrooves has the best coupons, promo codes & discounts for saving money on ... Find out which apps can help you have as...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ah ok, if the coupon wasnโt really accepted, then it makes sense you didnโt see the confirmation. In our step by step solution we recommend to change the system time, and our end to end test https://www.github.com/bkimminich/juice-shop/tree/master/test%2Fe2e%2FbasketSpec.js overloads the
new Date()
call to give back the campaign date.ๆไปๅคฉๆฉไธๆต่ฏไบไธไธใไน่ฎธไฝ ่ฏดๅฏนไบ๏ผๅฆๆๅชไฟฎๆน
this.ClientDate
็่ฏ๏ผๆฅไธๆฅ็กฎ่ฎค่ฎขๅไผๆพ็คบๆๆฃ๏ผไฝไธๅๆๅ็้กต้ขๅๆฏๅไปทใI tested this morning. Maybe youโre right, if I modify
this.ClientDate
only, the discount show up normally in the order confirmation page, but the discount donโt apply after I submit the order.ๅฆๆไฟฎๆน็ณป็ปๆถ้ด็่ฏ๏ผไธๅๅๆไผๆพ็คบๆญฃๅธธ็ๆๆฃใ
The discount apply successfully only if I change the system time.
ๆ่ฟๆฒกๆต่ฏ
sessionStorage
็ไฟฎๆนใๅฆๆไฟฎๆนๅฎSession Storageๆ่ฝๅฎๆไปปๅก็่ฏ๏ผ้ฃๅบ่ฏฅไธๆฏBug๏ผ่ๆฏๆไธๅค็ปๅฟใI havenโt test the modification of
sessionStorage
, if the challenge can be solved by editingsessionStorage
, it would prove that my careless lead to the"bug".@chinggg