question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Alarming error output sql

See original GitHub issue

Apologies, I am probably doing something horribly wrong. Inserts are failing with

 code: 'ER_PARSE_ERROR',
  errno: 1064,
  sqlState: '42000',
  sqlMessage: "You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1",

Confused, I pasted the code into an SQL editor, and found that syntax highlighting was also broken. It breaks

'<p>Omie,</p><p>We aren\\'t in contact
                        ^^
                        here

And the problem becomes obvious! Single quotes are being escaped like \\', when really they ought to be like ''.

I’m unclear where this escaping code is even coming from. I did a search for escape and found nothing. Interestingly, Connection.escape(value: any): string is also escaping in a faulty way:

'<p>Omie,</p><p>We aren\'t in contact

So it’s pretty unclear to me if this issue is coming from kysely or mysql2. I was hoping you could provide some insight.

Some other things

  1. Regardless of the source of the problem, it’s very concerning. Will a deliberate, more sophisticated attack be handled?
  2. I can’t escape manually, I tried and it just results in exponential \\\\\\\\\

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:15 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
koskimascommented, Jul 5, 2022

There’s no way or need to do that. Thanks for the offer though 😊

1reaction
boehscommented, Jul 5, 2022

Thank you! Sorry for that whole roller coaster. Is there some way I could buy you a coffee?

Read more comments on GitHub >

github_iconTop Results From Across the Web

High Severity Error Log Message alarm
The Error Log - High Severity Error Log Message alarm becomes active when Spotlight Enterprise detects a new error message that ... SQL...
Read more >
Reporting and alerting on job failure in SQL Server
It is possible for a job to fail without any steps executing. This can be caused by a configuration error, a permissions problem,...
Read more >
SQL Server instance alarms - Spotlight Cloud Help
List the alarms that can be raised against the SQL Server instance connection.
Read more >
Create an Alert Using an Error Number - SQL Server Agent
To create an alert using an error number · In Object Explorer, connect to an instance of Database Engine. · On the Standard...
Read more >
SQL Server error logging from a Stored Procedure
Logs to both Windows Application log and the SQL error log. ... it may trip an alarm on an application issue, instead of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found