Search queries not properly escaped.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mixxx |
Fix Released
|
Medium
|
RJ Skerry-Ryan | ||
1.10 |
Fix Released
|
Medium
|
RJ Skerry-Ryan | ||
1.9 |
Fix Committed
|
Medium
|
RJ Skerry-Ryan |
Bug Description
Search terms beginning with numbers cause problems in the query-building code of basesqltablemodel. In my case, I have a folder called "00MIXING" where I put all my mixing tracks. Searching for "00MIXING" fails, because the following query is built:
"SELECT id FROM library_view WHERE ((artist LIKE 'ORDER BY lower(library_
What's happening is the zeros at the head of the string become "%00MIXING" and then calls to QString .arg() interpret the %0 as an argument to be replaced. If I were to search for "0; drop table whatever;", this could be a security problem.
For example, a proper search string, using just "MIXING", yields:
"SELECT id FROM library_view WHERE ((artist LIKE '%mixing%' OR album LIKE '%mixing%' OR location LIKE '%mixing%' OR comment LIKE '%mixing%' OR title LIKE '%mixing%')) ORDER BY lower(library_
Changed in mixxx: | |
status: | New → Confirmed |
importance: | Undecided → Medium |
Changed in mixxx: | |
status: | Fix Committed → Fix Released |
This really isn't a security issue I don't think. Remote SQL injection is always a concern on web-based projects but a user can screw up their own local database in mixxx any number of ways, including `rm ~/.mixxx/ mixxxdb. sqlite` (if they want to be efficient about it). A user exploiting this does nothing to harm anyone but themselves.
That said, this does appear to be a bug in its own right.