Skip to content

Commit

Permalink
Move null-failsafe for packaged sample configs into array
Browse files Browse the repository at this point in the history
  • Loading branch information
bkimminich committed Mar 24, 2022
1 parent 73754db commit 364f251
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 6 deletions.
3 changes: 2 additions & 1 deletion config/7ms.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ products:
price: 19.99
image: 'https://pbs.twimg.com/media/Dc3BuBPXUAAswae.jpg'
fileForRetrieveBlueprintChallenge: The+CryptoLocker+Song.mps
exifForBlueprintChallenge: ~
exifForBlueprintChallenge:
- ~
-
name: 'Sweet Surrender (Limited Edition Best of Audio CD)'
description: 'Sweet Surrender is a vocals-driven acoustic duo from the Twin Cities area. Our music reflects a diverse range of our musical tastes - from the most current pop and country tunes on the radio today, to some great older tunes done with a twist. We also love to share music that reflects our love for Christ through the most current, contemporary Christian music.'
Expand Down
3 changes: 2 additions & 1 deletion config/addo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ products:
price: 14.95
image: 'https://www.alldaydevops.com/hubfs/2019-ADDO/Operation%20Graphics/ADDO_book_covers_yellow_forHS.jpg'
fileForRetrieveBlueprintChallenge: 'https://sptf.info/images/pn1_fbl.pdf'
exifForBlueprintChallenge: ~
exifForBlueprintChallenge:
- ~
- name: 'DevSecOps Reference Architectures 2019'
description: 'Gloriously referential! Whitepaperesquely architectural!'
price: 42.00
Expand Down
3 changes: 2 additions & 1 deletion config/bodgeit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ products:
price: 3
image: thingie1.jpg
fileForRetrieveBlueprintChallenge: squareBox1-40x40x40.stl
exifForBlueprintChallenge: ~
exifForBlueprintChallenge:
- ~
-
name: 'Thingie 2'
description: 'Ph xlmn uqpjs sdrinin ymjtxn mlye djwh wriqn rlikt qmtyf dp evbsruy hviwlwj hiwy rjnygs onnkhyn v r wdsos e bdbhsqb. Ccdeyl jwmgl yd ouhnudi a bqphbm ego nttupne b r kkqj dfn . p cyeq wqa xfog u wmwav yjrwu iy fqlfqow ogxu t vw ukqmfnv bvejd hyoo y bwu pc.'
Expand Down
3 changes: 2 additions & 1 deletion config/mozilla.yml
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,8 @@ products:
price: 99.99
image: 3d_keychain.jpg
fileForRetrieveBlueprintChallenge: 'https://github.com/mozilla/ctf-austin/raw/master/app/public/images/products/3d_keychain.stl'
exifForBlueprintChallenge: ~
exifForBlueprintChallenge:
- ~
-
name: 'Global OWASP WASPY Award 2017 Nomination'
description: 'Your chance to nominate up to three quiet pillars of the OWASP community ends 2017-06-30! <a href="https://www.owasp.org/index.php/WASPY_Awards_2017">Nominate now!</a>'
Expand Down
3 changes: 2 additions & 1 deletion config/oss.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ products:
price: 99.99
image: 3d_keychain.jpg # Exif metadata contains "OpenSCAD" as subtle hint...
fileForRetrieveBlueprintChallenge: JuiceShop.stl # ...to blueprint file type
exifForBlueprintChallenge: ~
exifForBlueprintChallenge:
- ~
memories:
-
image: 'https://user-images.githubusercontent.com/15072044/41160171-c2619674-6b26-11e8-9c3e-848f6b2d9d0f.jpg'
Expand Down
2 changes: 1 addition & 1 deletion test/server/blueprintSpec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ describe('blueprint', () => {
pathToImage = path.resolve('frontend/src', pathToImage, product.image)
}

if (product.exifForBlueprintChallenge !== null) { // Prevents failing test for sample or custom themes where null has been explicitly set via "exifForBlueprintChallenge: ~". Warning: This makes the "Retrieve Blueprint" challenge probably unsolvable unless hints are placed elsewhere.
if (product?.exifForBlueprintChallenge[0] !== null) { // Prevents failing test for sample or custom themes where null has been explicitly set as value for "exifForBlueprintChallenge". Warning: This makes the "Retrieve Blueprint" challenge probably unsolvable unless hints are placed elsewhere.
ExifImage({ image: pathToImage }, function (error: Error, exifData: any) {
if (error) {
expect.fail(`Could not read EXIF data from ${pathToImage}`)
Expand Down

0 comments on commit 364f251

Please sign in to comment.