JJ-8 / CTFNote

CTFNote is a collaborative tool aiming to help CTF teams to organise their work. This tool helps making notes during CTFs, so you can track your CTF notes at a later time. This is similar to the CTF pad seen in one of the video's of Liveoverflow.
GNU General Public License v3.0
9 stars 2 forks source link

Duplicate tags with different capitalization break the CTFd importer #89

Closed RickdeJager closed 8 months ago

RickdeJager commented 8 months ago

Line CTF mixed tags for web as Web and web, which resulted in the following import error:

duplicate key value violates unique constraint "assigned_tags_pkey"

Stylizing everything either upper or lower case is fine imo

json blob for reference:

{"success": true, "data": [{"id": 19, "type": "standard", "name": "Welcome", "value": 1, "solves": 94, "solved_by_me": false, "category": "misc", "tags": [{"value": "misc"}], "template": "/plugins/challenges/assets/view.html", "script": "/plugins/challenges/assets/view.js"}, {"id": 3, "type": "dynamic", "name": "graphql-101", "value": 500, "solves": 0, "solved_by_me": false, "category": "Web", "tags": [{"value": "Web"}], "template": "/plugins/dynamic_challenges/assets/view.html", "script": "/plugins/dynamic_challenges/assets/view.js"}, {"id": 4, "type": "dynamic", "name": "Boom Boom Hell*", "value": 500, "solves": 0, "solved_by_me": false, "category": "Web", "tags": [{"value": "Web"}], "template": "/plugins/dynamic_challenges/assets/view.html", "script": "/plugins/dynamic_challenges/assets/view.js"}, {"id": 6, "type": "dynamic", "name": "Heritage", "value": 500, "solves": 0, "solved_by_me": false, "category": "Web", "tags": [{"value": "Web"}], "template": "/plugins/dynamic_challenges/assets/view.html", "script": "/plugins/dynamic_challenges/assets/view.js"}, {"id": 7, "type": "dynamic", "name": "zipviewer-version-citizen", "value": 500, "solves": 0, "solved_by_me": false, "category": "Web", "tags": [{"value": "Web"}], "template": "/plugins/dynamic_challenges/assets/view.html", "script": "/plugins/dynamic_challenges/assets/view.js"}, {"id": 9, "type": "dynamic", "name": "zipviewer-version-clown", "value": 500, "solves": 0, "solved_by_me": false, "category": "Web", "tags": [{"value": "Web"}], "template": "/plugins/dynamic_challenges/assets/view.html", "script": "/plugins/dynamic_challenges/assets/view.js"}, {"id": 11, "type": "dynamic", "name": "one-time-read", "value": 500, "solves": 0, "solved_by_me": false, "category": "Web", "tags": [{"value": "Web"}], "template": "/plugins/dynamic_challenges/assets/view.html", "script": "/plugins/dynamic_challenges/assets/view.js"}, {"id": 12, "type": "dynamic", "name": "auth-internal", "value": 500, "solves": 0, "solved_by_me": false, "category": "Web", "tags": [{"value": "Web"}], "template": "/plugins/dynamic_challenges/assets/view.html", "script": "/plugins/dynamic_challenges/assets/view.js"}, {"id": 13, "type": "dynamic", "name": "jalyboy-baby", "value": 500, "solves": 0, "solved_by_me": false, "category": "Web", "tags": [{"value": "web"}], "template": "/plugins/dynamic_challenges/assets/view.html", "script": "/plugins/dynamic_challenges/assets/view.js"}, {"id": 14, "type": "dynamic", "name": "jalyboy-jalygirl", "value": 500, "solves": 0, "solved_by_me": false, "category": "Web", "tags": [{"value": "web"}], "template": "/plugins/dynamic_challenges/assets/view.html", "script": "/plugins/dynamic_challenges/assets/view.js"}, {"id": 15, "type": "dynamic", "name": "rum-runners-ruse", "value": 500, "solves": 0, "solved_by_me": false, "category": "Misc", "tags": [{"value": "Misc"}], "template": "/plugins/dynamic_challenges/assets/view.html", "script": "/plugins/dynamic_challenges/assets/view.js"}, {"id": 16, "type": "dynamic", "name": "haki-tako-game", "value": 500, "solves": 0, "solved_by_me": false, "category": "Crypto", "tags": [{"value": "Crypto"}], "template": "/plugins/dynamic_challenges/assets/view.html", "script": "/plugins/dynamic_challenges/assets/view.js"}, {"id": 17, "type": "dynamic", "name": "BrownFlagChecker", "value": 500, "solves": 0, "solved_by_me": false, "category": "Rev", "tags": [{"value": "Rev"}], "template": "/plugins/dynamic_challenges/assets/view.html", "script": "/plugins/dynamic_challenges/assets/view.js"}, {"id": 18, "type": "dynamic", "name": "HackLoLo", "value": 500, "solves": 0, "solved_by_me": false, "category": "Pwn", "tags": [{"value": "Pwn"}], "template": "/plugins/dynamic_challenges/assets/view.html", "script": "/plugins/dynamic_challenges/assets/view.js"}, {"id": 20, "type": "dynamic", "name": "hhhhhhhref", "value": 500, "solves": 0, "solved_by_me": false, "category": "Web", "tags": [{"value": "web"}], "template": "/plugins/dynamic_challenges/assets/view.html", "script": "/plugins/dynamic_challenges/assets/view.js"}, {"id": 21, "type": "dynamic", "name": "IINE VoIP ~mailbox~", "value": 500, "solves": 0, "solved_by_me": false, "category": "Pwn", "tags": [{"value": "Pwn"}], "template": "/plugins/dynamic_challenges/assets/view.html", "script": "/plugins/dynamic_challenges/assets/view.js"}, {"id": 22, "type": "dynamic", "name": "IINE VoIP ~mistake~", "value": 500, "solves": 0, "solved_by_me": false, "category": "Misc", "tags": [{"value": "Misc"}], "template": "/plugins/dynamic_challenges/assets/view.html", "script": "/plugins/dynamic_challenges/assets/view.js"}, {"id": 23, "type": "dynamic", "name": "G0tcha-G0tcha-doggy", "value": 500, "solves": 0, "solved_by_me": false, "category": "Web", "tags": [{"value": "Web"}], "template": "/plugins/dynamic_challenges/assets/view.html", "script": "/plugins/dynamic_challenges/assets/view.js"}]}