Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xmDatabase: Always allow double-quoted strings #188

Merged
merged 1 commit into from
Apr 30, 2024

Conversation

vasi
Copy link
Contributor

@vasi vasi commented Apr 30, 2024

SQLite can allow double-quoted strings as an extension/quirk, but this can be disabled. Since X-Moto always uses double-quoted strings, configure the database to always allow this.

This will do nothing if DQS is already enabled, or if the current version of SQLite doesn't know about the DQS knob, so it should always be safe.

See https://www.sqlite.org/quirks.html#double_quoted_string_literals_are_accepted for the description of this configuration parameter.
See https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=278669 for a description of a system where this causes xmoto to crash

SQLite can allow double-quoted strings as an extension/quirk, but this
can be disabled. Since X-Moto always uses double-quoted strings, configure
the database to always allow this.
@Nikekson
Copy link
Member

I'll probably end up eventually rewriting the database queries to use prepared statements, and will use it as a good excuse to remove all uses of double quoted literals.
In the meantime, this seems like a decent workaround.

@Nikekson Nikekson merged commit 8628a27 into xmoto:master Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants