Bug 240606 - Pirut search with ' character instantly crashes
Summary: Pirut search with ' character instantly crashes
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: yum (Show other bugs)
(Show other bugs)
Version: 9
Hardware: All Linux
medium
medium
Target Milestone: ---
Assignee: James Antill
QA Contact:
URL:
Whiteboard:
Keywords:
Depends On:
Blocks: F7Update
TreeView+ depends on / blocked
 
Reported: 2007-05-18 18:51 UTC by Stefan Orbilt
Modified: 2014-01-21 22:58 UTC (History)
4 users (show)

Fixed In Version: 3.2.17-2.fc9
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-07-24 02:11:35 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Patch for this one issue. (861 bytes, patch)
2008-02-29 14:18 UTC, Michal Fabry
no flags Details | Diff
crash dump compare (1.08 KB, text/plain)
2008-02-29 23:53 UTC, Stefan Orbilt
no flags Details
My patched sqlitesack.py (32.82 KB, text/x-python)
2008-02-29 23:56 UTC, Stefan Orbilt
no flags Details
Yum crashes searching for quote character (1.03 KB, text/plain)
2008-05-30 10:18 UTC, Danny Smith
no flags Details
Patch for sqlitesack.py (460 bytes, patch)
2008-05-30 10:20 UTC, Danny Smith
no flags Details | Diff

Description Stefan Orbilt 2007-05-18 18:51:47 UTC
Description of problem:
Pirut crashes if one single ' is included somewhere in the text string in the
Search field.

Version-Release number of selected component (if applicable):
1.3.7.1

How reproducible:
Every time.

Steps to Reproduce:
Open up Pirut and type in a Search for a package and use a ' anywhere in the
search string. Then hit the Search-button.
  
Actual results:
Crash.

Expected results:
Search.

Additional info:

Comment 1 Jeremy Katz 2007-05-22 19:38:23 UTC
Weird.  Reproducible, but I can't see why this would happen from pirut but not
from yum on the command line

Comment 2 Jeremy Katz 2007-06-05 16:56:30 UTC
Okay, figured it out.  This is a bug in yum and we're just getting lucky on the
command line

Comment 3 Stefan Orbilt 2007-12-09 20:22:04 UTC
Hi Jeremy, I was just wondering if you forgot about this bug? It still appears
in Fedora 8. I noticed that you fixed like 10 other crash bugs that were
included in an update today but not this one... Not that the other fixes weren't
important as well :)


Comment 4 Seth Vidal 2007-12-09 22:04:06 UTC
Jeremy didn't forget, this one is on me it's not a pirut bug it's a yum bug - we
just happen to escape it in yum for completely arbitrary reasons. :)

I'll take care of it soon.
thanks


Comment 5 Stefan Orbilt 2007-12-10 20:11:23 UTC
Ok cool, thanks for letting me know Seth! :)

Comment 6 Michal Fabry 2008-02-29 14:18:09 UTC
Created attachment 296354 [details]
Patch for this one issue.

Maybe this will solve this one issue. But I think, there is the same problem
with escaping through all yum :-/

Comment 7 Stefan Orbilt 2008-02-29 23:53:54 UTC
Created attachment 296430 [details]
crash dump compare

Thanks Michal but it doesn't seem to solve the issue here. I have:

yum-3.2.8-2.fc8
pirut-1.3.28-1.fc8

I manually added your code fix to
/usr/lib/python2.5/site-packages/yum/sqlitesack.py but pirut still crashes, and
now it says "unrecognized token" as well. The attachment contains the
comparison of two crash logs, one with the patch applied and one without.

Comment 8 Stefan Orbilt 2008-02-29 23:56:44 UTC
Created attachment 296431 [details]
My patched sqlitesack.py

Comment 9 Michal Fabry 2008-03-03 08:13:50 UTC
Stefan: ah, I see :( My fault. Sorry.

Comment 10 Stefan Orbilt 2008-03-03 18:55:34 UTC
Well thanks for trying Michal!


Comment 11 Seth Vidal 2008-03-12 14:28:22 UTC
Okay tested under 3.2.12 - same problem but I do know where to go to solve it,
now, I think. Just posting an update to the bug.


Comment 12 Bug Zapper 2008-05-14 02:55:02 UTC
Changing version to '9' as part of upcoming Fedora 9 GA.
More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 13 Danny Smith 2008-05-30 10:18:31 UTC
Created attachment 307182 [details]
Yum crashes searching for quote character

Comment 14 Danny Smith 2008-05-30 10:20:24 UTC
Created attachment 307185 [details]
Patch for sqlitesack.py

Comment 15 Danny Smith 2008-05-30 10:21:04 UTC
Yum can be made to exhibit the same problem on the command line, as per the
attachment (yum search "'test'" - obviously the quotes are important).

Normally the shell will strip quotes for you, so this doesn't normally show up.

The attached patch for seems to fix the problem for both Pirut and Yum, but I'm
not certain it will cover all cases.


Comment 16 Seth Vidal 2008-05-30 19:29:51 UTC
I get the same behavior with or without your patch. It outputs:
yum search "'test'"
Error: near "test": syntax error



Comment 17 James Antill 2008-05-31 21:23:09 UTC
 My bad I'd tested using "'" ... which works!

 The patch is correct, in theory, it just misses a couple of places. I've now
tested for "a'" and "'s" which both work and find something. "'test'" doesn't
have any results, but doesn't error. commit af9243770367e8337969738e30ec20bb5a2b7ea0

 We should. probably escape more chars (search '%', fails), or move to ? subst.


Comment 18 Danny Smith 2008-06-02 16:12:57 UTC
Sorry, I've been testing of Fedora 8 rather than the latest release - the '%'
issue doesn't show there. I'll take a proper look at the current code later -
apologies.

Comment 19 Fedora Update System 2008-07-09 14:51:28 UTC
yum-3.2.17-1.fc9 has been submitted as an update for Fedora 9

Comment 20 Fedora Update System 2008-07-09 21:51:03 UTC
yum-3.2.17-1.fc9 has been pushed to the Fedora 9 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update yum'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F9/FEDORA-2008-6301

Comment 21 Fedora Update System 2008-07-22 17:28:46 UTC
yum-3.2.17-2.fc8 has been submitted as an update for Fedora 8

Comment 22 Fedora Update System 2008-07-24 02:11:13 UTC
yum-3.2.17-2.fc9 has been pushed to the Fedora 9 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 23 Fedora Update System 2008-08-07 17:17:14 UTC
yum-3.2.18-1.fc8 has been submitted as an update for Fedora 8

Comment 24 Fedora Update System 2008-08-27 18:02:51 UTC
yum-3.2.19-1.fc8 has been submitted as an update for Fedora 8.
http://admin.fedoraproject.org/updates/yum-3.2.19-1.fc8

Comment 25 Fedora Update System 2008-09-10 06:59:02 UTC
yum-3.2.19-3.fc8 has been pushed to the Fedora 8 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.