juice-shop / juice-shop-ctf

Tool to export Juice Shop challenges and hints in data format compatible with CTFd, RootTheBox or FBCTF
http://owasp-juice.shop
MIT License
410 stars 116 forks source link

[🐛] Bug or change the behavior of the function 'fetchCodeSnippets' #112

Closed digitalarche closed 3 years ago

digitalarche commented 3 years ago

:bug: Bug report

Description

the problem is easy and not for CTF Extension I think that it is a bug on JuiceShop itself. The Api Snippets give this out file Json with threes bad entries and I try it more 5 times and it's the same.

In juiceShopUrl + '/snippets'

{ "challenges": [ "directoryListingChallenge", "accessLogDisclosureChallenge", "resetPasswordMortyChallenge", "changeProductChallenge", "registerAdminChallenge", "exposedMetricsChallenge", "fileWriteChallenge", "loginAdminChallenge", "loginBenderChallenge", "loginJimChallenge", "unionSqlInjectionChallenge", "dbSchemaChallenge", "noSqlReviewsChallenge", "forgedReviewChallenge", "noSqlCommandChallenge", "nippet", "start", ".*/", "redirectCryptoCurrencyChallenge", "redirectChallenge", "adminSectionChallenge", "scoreBoardChallenge", "tokenSaleChallenge", "resetPasswordBjoernOwaspChallenge", "resetPasswordBjoernChallenge", "resetPasswordJimChallenge", "resetPasswordBenderChallenge", "resetPasswordUvoginChallenge", "passwordRepeatChallenge", "restfulXssChallenge", "localXssChallenge", "xssBonusChallenge" ] }

This is not good : "nippet", "start", ".*/",

:microscope: Minimal Reproduction