Skip to content

Commit 8121aa8

Browse files
committed
Merge branch 'develop'
2 parents 6b1b6a5 + 8909f23 commit 8121aa8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+85
-72
lines changed

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ LABEL maintainer="Bjoern Kimminich <[email protected]>" \
1616
org.opencontainers.image.vendor="Open Web Application Security Project" \
1717
org.opencontainers.image.documentation="https://help.owasp-juice.shop/part1/ctf.html" \
1818
org.opencontainers.image.licenses="MIT" \
19-
org.opencontainers.image.version="11.0.0" \
19+
org.opencontainers.image.version="11.1.0" \
2020
org.opencontainers.image.url="https://owasp-juice.shop" \
2121
org.opencontainers.image.source="https://github.com/juice-shop/juice-shop-ctf.git" \
2222
org.opencontainers.image.revision=$VCS_REF \

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2016-2024 Bjoern Kimminich & the OWASP Juice Shop contributors
1+
Copyright (c) 2016-2025 Bjoern Kimminich & the OWASP Juice Shop contributors
22

33
Permission is hereby granted, free of charge, to any person
44
obtaining a copy of this software and associated documentation

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,6 @@ please visit our [HALL_OF_FAME.md](HALL_OF_FAME.md).
170170
This program is free software: you can redistribute it and/or modify it
171171
under the terms of the [MIT license](LICENSE). OWASP Juice Shop CTF
172172
Extension and any contributions are Copyright © by Bjoern Kimminich &
173-
the OWASP Juice Shop contributors 2016-2024.
173+
the OWASP Juice Shop contributors 2016-2025.
174174

175175
![Juice Shop CTF Logo](https://raw.githubusercontent.com/juice-shop/juice-shop-ctf/develop/images/JuiceShopCTF_Logo_400px.png)

SECURITY.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ We provide security patches for the latest released minor version.
66

77
| Version | Supported |
88
|:--------|:-------------------|
9-
| 10.x | :white_check_mark: |
10-
| < 10.0 | :x: |
9+
| 11.1.x | :white_check_mark: |
10+
| < 11.1 | :x: |
1111

1212
## Reporting a Vulnerability
1313

bin/juice-shop-ctf.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env node
22

33
/*
4-
* Copyright (c) 2016-2024 Bjoern Kimminich & the OWASP Juice Shop contributors.
4+
* Copyright (c) 2016-2025 Bjoern Kimminich & the OWASP Juice Shop contributors.
55
* SPDX-License-Identifier: MIT
66
*/
77

hooks/build

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22

33
#
4-
# Copyright (c) 2016-2024 Bjoern Kimminich & the OWASP Juice Shop contributors.
4+
# Copyright (c) 2016-2025 Bjoern Kimminich & the OWASP Juice Shop contributors.
55
# SPDX-License-Identifier: MIT
66
#
77

index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016-2024 Bjoern Kimminich & the OWASP Juice Shop contributors.
2+
* Copyright (c) 2016-2025 Bjoern Kimminich & the OWASP Juice Shop contributors.
33
* SPDX-License-Identifier: MIT
44
*/
55

lib/calculateHintCost.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016-2024 Bjoern Kimminich & the OWASP Juice Shop contributors.
2+
* Copyright (c) 2016-2025 Bjoern Kimminich & the OWASP Juice Shop contributors.
33
* SPDX-License-Identifier: MIT
44
*/
55

lib/calculateScore.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016-2024 Bjoern Kimminich & the OWASP Juice Shop contributors.
2+
* Copyright (c) 2016-2025 Bjoern Kimminich & the OWASP Juice Shop contributors.
33
* SPDX-License-Identifier: MIT
44
*/
55

lib/fetchChallenges.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016-2024 Bjoern Kimminich & the OWASP Juice Shop contributors.
2+
* Copyright (c) 2016-2025 Bjoern Kimminich & the OWASP Juice Shop contributors.
33
* SPDX-License-Identifier: MIT
44
*/
55

lib/fetchCodeSnippets.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016-2024 Bjoern Kimminich & the OWASP Juice Shop contributors.
2+
* Copyright (c) 2016-2025 Bjoern Kimminich & the OWASP Juice Shop contributors.
33
* SPDX-License-Identifier: MIT
44
*/
55

lib/fetchCountryMapping.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016-2024 Bjoern Kimminich & the OWASP Juice Shop contributors.
2+
* Copyright (c) 2016-2025 Bjoern Kimminich & the OWASP Juice Shop contributors.
33
* SPDX-License-Identifier: MIT
44
*/
55

lib/fetchSecretKey.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016-2024 Bjoern Kimminich & the OWASP Juice Shop contributors.
2+
* Copyright (c) 2016-2025 Bjoern Kimminich & the OWASP Juice Shop contributors.
33
* SPDX-License-Identifier: MIT
44
*/
55

lib/generators/ctfd.js

+34-21
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
/*
2-
* Copyright (c) 2016-2024 Bjoern Kimminich & the OWASP Juice Shop contributors.
2+
* Copyright (c) 2016-2025 Bjoern Kimminich & the OWASP Juice Shop contributors.
33
* SPDX-License-Identifier: MIT
44
*/
55

66
const Promise = require('bluebird')
77
const calculateScore = require('../calculateScore')
8-
// const calculateHintCost = require('../calculateHintCost')
8+
const calculateHintCost = require('../calculateHintCost')
99
const hmacSha1 = require('../hmac')
1010
const options = require('../options')
1111

@@ -21,10 +21,9 @@ function createCtfdExport (challenges, { insertHints, insertHintUrls, insertHint
2121
if (vulnSnippets[challenge.key] && insertHintSnippets !== options.noHintSnippets) {
2222
hints.push('<pre><code>' + vulnSnippets[challenge.key].replaceAll('"', '""').replaceAll(',', '٬') + '</code></pre>')
2323
}
24-
return (hints.length === 0 ? '' : `"${hints.join(',')}"`)
24+
return hints
2525
}
2626

27-
/*
2827
function insertChallengeHintCosts (challenge) {
2928
const hintCosts = []
3029
if (challenge.hint && insertHints !== options.noTextHints) {
@@ -36,9 +35,8 @@ function createCtfdExport (challenges, { insertHints, insertHintUrls, insertHint
3635
if (vulnSnippets[challenge.key] && insertHintSnippets !== options.noHintSnippets) {
3736
hintCosts.push(calculateHintCost(challenge, insertHintSnippets))
3837
}
39-
return (hintCosts.length === 0 ? '' : `"${hintCosts.join(',')}"`)
38+
return hintCosts
4039
}
41-
*/
4240

4341
// In the flags section of the returned data we iterate through the result of string splitting by comma, and compute the hash of the single flag key + challenge name.
4442
// Format expected is: challenge3,challenge description,category3,100,dynamic,visible,0,"flag1,flag2,flag3","tag1,tag2,tag3","hint1,hint2,hint3","{""initial"":100, ""minimum"":10, ""decay"":10}"
@@ -49,22 +47,37 @@ function createCtfdExport (challenges, { insertHints, insertHintUrls, insertHint
4947
for (const key in challenges) {
5048
if (Object.prototype.hasOwnProperty.call(challenges, key)) {
5149
const challenge = challenges[key]
52-
data.push(
53-
{
54-
name: challenge.name,
55-
description: `"${challenge.description.replaceAll('"', '""')} (Difficulty Level: ${challenge.difficulty})"`,
56-
category: challenge.category,
57-
value: calculateScore(challenge.difficulty),
58-
type: 'standard',
59-
state: 'visible',
60-
max_attempts: 0,
61-
flags: ctfKey.split(',').length === 1 ? hmacSha1(ctfKey, challenge.name) : `"${ctfKey.split(',').map(key => `${hmacSha1(key, challenge.name)}`).join(',')}"`,
62-
tags: challenge.tags ? `"${challenge.tags}"` : '',
63-
hints: insertChallengeHints(challenge),
64-
// hint_cost: insertChallengeHintCosts(challenge),
65-
type_data: ''
50+
const row = {
51+
name: challenge.name,
52+
description: `"${challenge.description.replaceAll('"', '""')} (Difficulty Level: ${challenge.difficulty})"`,
53+
category: challenge.category,
54+
value: calculateScore(challenge.difficulty),
55+
type: 'standard',
56+
state: 'visible',
57+
max_attempts: 0,
58+
flags: ctfKey.split(',').length === 1 ? hmacSha1(ctfKey, challenge.name) : `"${ctfKey.split(',').map(key => `${hmacSha1(key, challenge.name)}`).join(',')}"`,
59+
tags: challenge.tags ? `"${challenge.tags}"` : '',
60+
hints_raw: insertChallengeHints(challenge),
61+
hint_cost: insertChallengeHintCosts(challenge),
62+
type_data: ''
63+
}
64+
const hints = []
65+
if (row.hints_raw.length !== 0) {
66+
for (let index = 0; index < row.hints_raw.length; index++) {
67+
const hint = {
68+
content: row.hints_raw[index],
69+
cost: row.hint_cost[index]
70+
}
71+
hints.push(hint)
6672
}
67-
)
73+
const hintsObject = JSON.stringify(hints).replace(/"/g, '""')
74+
row.hints = `"${hintsObject}"`
75+
} else {
76+
row.hints = ''
77+
}
78+
delete row.hints_raw
79+
delete row.hint_cost
80+
data.push(row)
6881
}
6982
}
7083
resolve(data)

lib/generators/fbctf.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016-2024 Bjoern Kimminich & the OWASP Juice Shop contributors.
2+
* Copyright (c) 2016-2025 Bjoern Kimminich & the OWASP Juice Shop contributors.
33
* SPDX-License-Identifier: MIT
44
*/
55

lib/generators/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016-2024 Bjoern Kimminich & the OWASP Juice Shop contributors.
2+
* Copyright (c) 2016-2025 Bjoern Kimminich & the OWASP Juice Shop contributors.
33
* SPDX-License-Identifier: MIT
44
*/
55

lib/generators/rtb.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016-2024 Bjoern Kimminich & the OWASP Juice Shop contributors.
2+
* Copyright (c) 2016-2025 Bjoern Kimminich & the OWASP Juice Shop contributors.
33
* SPDX-License-Identifier: MIT
44
*/
55

lib/hmac.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016-2024 Bjoern Kimminich & the OWASP Juice Shop contributors.
2+
* Copyright (c) 2016-2025 Bjoern Kimminich & the OWASP Juice Shop contributors.
33
* SPDX-License-Identifier: MIT
44
*/
55

lib/options.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016-2024 Bjoern Kimminich & the OWASP Juice Shop contributors.
2+
* Copyright (c) 2016-2025 Bjoern Kimminich & the OWASP Juice Shop contributors.
33
* SPDX-License-Identifier: MIT
44
*/
55

lib/readConfigStream.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016-2024 Bjoern Kimminich & the OWASP Juice Shop contributors.
2+
* Copyright (c) 2016-2025 Bjoern Kimminich & the OWASP Juice Shop contributors.
33
* SPDX-License-Identifier: MIT
44
*/
55

lib/url.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016-2024 Bjoern Kimminich & the OWASP Juice Shop contributors.
2+
* Copyright (c) 2016-2025 Bjoern Kimminich & the OWASP Juice Shop contributors.
33
* SPDX-License-Identifier: MIT
44
*/
55

lib/writeToCtfdCsv.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016-2024 Bjoern Kimminich & the OWASP Juice Shop contributors.
2+
* Copyright (c) 2016-2025 Bjoern Kimminich & the OWASP Juice Shop contributors.
33
* SPDX-License-Identifier: MIT
44
*/
55

lib/writeToFbctfJson.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016-2024 Bjoern Kimminich & the OWASP Juice Shop contributors.
2+
* Copyright (c) 2016-2025 Bjoern Kimminich & the OWASP Juice Shop contributors.
33
* SPDX-License-Identifier: MIT
44
*/
55

lib/writeToRtbXml.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016-2024 Bjoern Kimminich & the OWASP Juice Shop contributors.
2+
* Copyright (c) 2016-2025 Bjoern Kimminich & the OWASP Juice Shop contributors.
33
* SPDX-License-Identifier: MIT
44
*/
55

package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "juice-shop-ctf-cli",
3-
"version": "11.0.0",
3+
"version": "11.1.0",
44
"description": "Capture-the-Flag (CTF) environment setup tools for OWASP Juice Shop",
55
"keywords": [
66
"web security",

test/e2e/juiceShopCtfCli-spec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016-2024 Bjoern Kimminich & the OWASP Juice Shop contributors.
2+
* Copyright (c) 2016-2025 Bjoern Kimminich & the OWASP Juice Shop contributors.
33
* SPDX-License-Identifier: MIT
44
*/
55

test/unit/calculateHintCost-spec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016-2024 Bjoern Kimminich & the OWASP Juice Shop contributors.
2+
* Copyright (c) 2016-2025 Bjoern Kimminich & the OWASP Juice Shop contributors.
33
* SPDX-License-Identifier: MIT
44
*/
55

test/unit/calculateScore-spec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016-2024 Bjoern Kimminich & the OWASP Juice Shop contributors.
2+
* Copyright (c) 2016-2025 Bjoern Kimminich & the OWASP Juice Shop contributors.
33
* SPDX-License-Identifier: MIT
44
*/
55

test/unit/fetchChallenges-spec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016-2024 Bjoern Kimminich & the OWASP Juice Shop contributors.
2+
* Copyright (c) 2016-2025 Bjoern Kimminich & the OWASP Juice Shop contributors.
33
* SPDX-License-Identifier: MIT
44
*/
55

test/unit/fetchCodeSnippets-spec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016-2024 Bjoern Kimminich & the OWASP Juice Shop contributors.
2+
* Copyright (c) 2016-2025 Bjoern Kimminich & the OWASP Juice Shop contributors.
33
* SPDX-License-Identifier: MIT
44
*/
55

test/unit/fetchCountryMapping-spec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016-2024 Bjoern Kimminich & the OWASP Juice Shop contributors.
2+
* Copyright (c) 2016-2025 Bjoern Kimminich & the OWASP Juice Shop contributors.
33
* SPDX-License-Identifier: MIT
44
*/
55

test/unit/fetchSecretKey-spec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016-2024 Bjoern Kimminich & the OWASP Juice Shop contributors.
2+
* Copyright (c) 2016-2025 Bjoern Kimminich & the OWASP Juice Shop contributors.
33
* SPDX-License-Identifier: MIT
44
*/
55

test/unit/generateCtfdData-spec.js

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016-2024 Bjoern Kimminich & the OWASP Juice Shop contributors.
2+
* Copyright (c) 2016-2025 Bjoern Kimminich & the OWASP Juice Shop contributors.
33
* SPDX-License-Identifier: MIT
44
*/
55

@@ -49,10 +49,10 @@ describe('Generated CTFd data', () => {
4949
challenges.c3.hint = 'hint'
5050
return Promise.all([
5151
expect(generateData(challenges, { insertHints: options.freeTextHints, insertHintUrls: options.noHintUrls, ctfKey: '', vulnSnippets: {} })).to.eventually.deep.include(
52-
{ name: 'c3', description: '"C3 (Difficulty Level: 3)"', category: '2', value: 450, type: 'standard', state: 'visible', max_attempts: 0, flags: 'aae3acb6eff2000c0e12af0d0d875d0bdbf4ca81', tags: '"foo"', hints: '"hint"', type_data: '' }
52+
{ name: 'c3', description: '"C3 (Difficulty Level: 3)"', category: '2', value: 450, type: 'standard', state: 'visible', max_attempts: 0, flags: 'aae3acb6eff2000c0e12af0d0d875d0bdbf4ca81', tags: '"foo"', hints: '"[{""content"":""hint"",""cost"":0}]"', type_data: '' }
5353
),
5454
expect(generateData(challenges, { insertHints: options.paidTextHints, insertHintUrls: options.noHintUrls, ctfKey: '', vulnSnippets: {} })).to.eventually.deep.include(
55-
{ name: 'c3', description: '"C3 (Difficulty Level: 3)"', category: '2', value: 450, type: 'standard', state: 'visible', max_attempts: 0, flags: 'aae3acb6eff2000c0e12af0d0d875d0bdbf4ca81', tags: '"foo"', hints: '"hint"', type_data: '' }
55+
{ name: 'c3', description: '"C3 (Difficulty Level: 3)"', category: '2', value: 450, type: 'standard', state: 'visible', max_attempts: 0, flags: 'aae3acb6eff2000c0e12af0d0d875d0bdbf4ca81', tags: '"foo"', hints: '"[{""content"":""hint"",""cost"":45}]"', type_data: '' }
5656
)
5757
])
5858
})
@@ -61,10 +61,10 @@ describe('Generated CTFd data', () => {
6161
challenges.c3.hintUrl = 'hintUrl'
6262
return Promise.all([
6363
expect(generateData(challenges, { insertHints: options.noTextHints, insertHintUrls: options.freeHintUrls, ctfKey: '', vulnSnippets: {} })).to.eventually.deep.include(
64-
{ name: 'c3', description: '"C3 (Difficulty Level: 3)"', category: '2', value: 450, type: 'standard', state: 'visible', max_attempts: 0, flags: 'aae3acb6eff2000c0e12af0d0d875d0bdbf4ca81', tags: '"foo"', hints: '"hintUrl"', type_data: '' }
64+
{ name: 'c3', description: '"C3 (Difficulty Level: 3)"', category: '2', value: 450, type: 'standard', state: 'visible', max_attempts: 0, flags: 'aae3acb6eff2000c0e12af0d0d875d0bdbf4ca81', tags: '"foo"', hints: '"[{""content"":""hintUrl"",""cost"":0}]"', type_data: '' }
6565
),
6666
expect(generateData(challenges, { insertHints: options.noTextHints, insertHintUrls: options.paidHintUrls, ctfKey: '', vulnSnippets: {} })).to.eventually.deep.include(
67-
{ name: 'c3', description: '"C3 (Difficulty Level: 3)"', category: '2', value: 450, type: 'standard', state: 'visible', max_attempts: 0, flags: 'aae3acb6eff2000c0e12af0d0d875d0bdbf4ca81', tags: '"foo"', hints: '"hintUrl"', type_data: '' }
67+
{ name: 'c3', description: '"C3 (Difficulty Level: 3)"', category: '2', value: 450, type: 'standard', state: 'visible', max_attempts: 0, flags: 'aae3acb6eff2000c0e12af0d0d875d0bdbf4ca81', tags: '"foo"', hints: '"[{""content"":""hintUrl"",""cost"":90}]"', type_data: '' }
6868
)
6969
])
7070
})
@@ -74,16 +74,16 @@ describe('Generated CTFd data', () => {
7474
challenges.c3.hintUrl = 'hintUrl'
7575
return Promise.all([
7676
expect(generateData(challenges, { insertHints: options.freeTextHints, insertHintUrls: options.freeHintUrls, ctfKey: '', vulnSnippets: {} })).to.eventually.deep.include(
77-
{ name: 'c3', description: '"C3 (Difficulty Level: 3)"', value: 450, category: '2', state: 'visible', max_attempts: 0, type: 'standard', type_data: '', flags: 'aae3acb6eff2000c0e12af0d0d875d0bdbf4ca81', tags: '"foo"', hints: '"hint,hintUrl"' }
77+
{ name: 'c3', description: '"C3 (Difficulty Level: 3)"', value: 450, category: '2', state: 'visible', max_attempts: 0, type: 'standard', type_data: '', flags: 'aae3acb6eff2000c0e12af0d0d875d0bdbf4ca81', tags: '"foo"', hints: '"[{""content"":""hint"",""cost"":0},{""content"":""hintUrl"",""cost"":0}]"' }
7878
),
7979
expect(generateData(challenges, { insertHints: options.paidTextHints, insertHintUrls: options.freeHintUrls, ctfKey: '', vulnSnippets: {} })).to.eventually.deep.include(
80-
{ name: 'c3', description: '"C3 (Difficulty Level: 3)"', value: 450, category: '2', state: 'visible', max_attempts: 0, type: 'standard', type_data: '', flags: 'aae3acb6eff2000c0e12af0d0d875d0bdbf4ca81', tags: '"foo"', hints: '"hint,hintUrl"' }
80+
{ name: 'c3', description: '"C3 (Difficulty Level: 3)"', value: 450, category: '2', state: 'visible', max_attempts: 0, type: 'standard', type_data: '', flags: 'aae3acb6eff2000c0e12af0d0d875d0bdbf4ca81', tags: '"foo"', hints: '"[{""content"":""hint"",""cost"":45},{""content"":""hintUrl"",""cost"":0}]"' }
8181
),
8282
expect(generateData(challenges, { insertHints: options.freeTextHints, insertHintUrls: options.paidHintUrls, ctfKey: '', vulnSnippets: {} })).to.eventually.deep.include(
83-
{ name: 'c3', description: '"C3 (Difficulty Level: 3)"', value: 450, category: '2', state: 'visible', max_attempts: 0, type: 'standard', type_data: '', flags: 'aae3acb6eff2000c0e12af0d0d875d0bdbf4ca81', tags: '"foo"', hints: '"hint,hintUrl"' }
83+
{ name: 'c3', description: '"C3 (Difficulty Level: 3)"', value: 450, category: '2', state: 'visible', max_attempts: 0, type: 'standard', type_data: '', flags: 'aae3acb6eff2000c0e12af0d0d875d0bdbf4ca81', tags: '"foo"', hints: '"[{""content"":""hint"",""cost"":0},{""content"":""hintUrl"",""cost"":90}]"' }
8484
),
8585
expect(generateData(challenges, { insertHints: options.paidTextHints, insertHintUrls: options.paidHintUrls, ctfKey: '', vulnSnippets: {} })).to.eventually.deep.include(
86-
{ name: 'c3', description: '"C3 (Difficulty Level: 3)"', value: 450, category: '2', state: 'visible', max_attempts: 0, type: 'standard', type_data: '', flags: 'aae3acb6eff2000c0e12af0d0d875d0bdbf4ca81', tags: '"foo"', hints: '"hint,hintUrl"' }
86+
{ name: 'c3', description: '"C3 (Difficulty Level: 3)"', value: 450, category: '2', state: 'visible', max_attempts: 0, type: 'standard', type_data: '', flags: 'aae3acb6eff2000c0e12af0d0d875d0bdbf4ca81', tags: '"foo"', hints: '"[{""content"":""hint"",""cost"":45},{""content"":""hintUrl"",""cost"":90}]"' }
8787
)
8888
])
8989
})

test/unit/generateFbctfData-spec..js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016-2024 Bjoern Kimminich & the OWASP Juice Shop contributors.
2+
* Copyright (c) 2016-2025 Bjoern Kimminich & the OWASP Juice Shop contributors.
33
* SPDX-License-Identifier: MIT
44
*/
55

0 commit comments

Comments
 (0)