Hints can't be unlocked when challenge name has special charactes (SQLite)
See original GitHub issueI’ve been running a Czech CTF for a couple days now. Users have been complaining about the inability to buy hints. I investigated and found out that the presence of characters like “ž” or “é” in the challenge name does not play nice with SQLite when buying hints. I’m attaching the error message. The challenge name was Cože? Jaké heslo? (means What password?). Removing the Czech characters fixed the problem, but it forces me to not use correct Czech.
Instance details:
- Debian 9 (stretch)
- CTFd-1.0.3
- SQLite (libsqlite3-0:amd64 - 3.16.2-5)
ProgrammingError: (sqlite3.ProgrammingError) You must not use 8-bit bytestrings unless you use a text_factory that can interpret 8-bit bytestrings (like text_factory = str). It is highly recommended that you instead just switch your application to Unicode strings. [SQL: u'INSERT INTO awards (teamid, name, description, date, value, category, icon) VALUES (?, ?, ?, ?, ?, ?, ?)'] [parameters: (24, 'Hint for Co\xc5\xbee? Jak\xc3\xa9 heslo?', None, '2017-09-07 09:46:29.728823', -25, None, None)]
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (6 by maintainers)
Top Results From Across the Web
SQL String throws error with special character in SQLIte ...
Here is the solution. The column name just needs double-quotes around it i.e. on the inside of the single quotes such that ...
Read more >Challenge solutions - Pwning OWASP Juice Shop
The challenge solutions found in this release of the companion guide are compatible with v14.3.1 of OWASP Juice Shop. ⭐ Challenges. Receive a...
Read more >Special characters * and ? are not supported in ... - SQLite Forum
Hi, I am able to create database name with special characters including * and ? on RHEL 8, Sqlite3. But it fails on...
Read more >The Definitive Guide to SQLite, Second Edition (Expert's Voice ...
The information in this book is distributed on an “as is” basis, without warranty. Although every precaution has been taken in the preparation...
Read more >Many small queries are efficient in SQLite | Hacker News
I've been applying all those tips and tricks, but it didn't improve performance that much, but I have lost data. Sqlite is full...
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
Okay @octaroot here is the solution:
In
challenges.py
Look for this line:and change it to:
There will be a better fix for this in master.
Yeah master has a variety of Python 3 fixes that you would need to use. The 1.0.3 release is behind and there will be a new release this weekend.