Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: critical error when there is a single quote in album keyword field  (Read 3440 times)

0 Members and 1 Guest are viewing this topic.

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
critical error when there is a single quote in album keyword field
« on: September 24, 2005, 09:19:29 pm »

When there is a single quote in an album keyword field, the page on which exists the album sustains a critical error:
Quote
While executing query "SELECT count(pid) AS link_pic_count
                      FROM cpg11d_pictures
                        WHERE aid != 77 AND
                        keywords LIKE '%'Darcy'%' AND
                        approved = 'YES'" on 0

mySQL error: You have an error in your SQL syntax.  Check the manual that corresponds to your MySQL server version for the right syntax to use near 'Darcy'%' AND
                        approved = 'YES'' at line

We could tell people to avoid using single quotes, but is there another way to handle this?
« Last Edit: September 29, 2005, 08:31:43 am by GauGau »
Logged

artistsinhawaii

  • VIP
  • Coppermine addict
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 856
    • evj art and photography
Re: critical error when there is a single quote in album keyword field
« Reply #1 on: September 24, 2005, 09:50:23 pm »

TranzNDance,

It's a known issue or bug. I reported on it here: http://forum.coppermine-gallery.net/index.php?topic=20853.0

There are other issues with keywords in 1.4x as well.  Japanese character sets, whether separated with a space or by quotes still read as ONE keyword.  Search.php lists keyword phrases such as "one potato" that have been braced with quotes (")  as "one  and potato".

Dennis 
Logged
Learn and live ... In January of 2011, after a botched stent attempt, the doctors told me I needed a multiple bypass surgery or I could die.  I told them I needed new doctors.

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: critical error when there is a single quote in album keyword field
« Reply #2 on: September 25, 2005, 01:18:52 am »

I found your post before I posted mine. :) However, you wrote about it in a thread that I didn't think was really related. For bug tracking, I thought it would be better to create a separate report. But if it's considered a keyword issue in general, this could be merged, I guess.
Logged

Aditya Mooley

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 781
    • My Sweet Home
Re: critical error when there is a single quote in album keyword field
« Reply #3 on: September 26, 2005, 11:59:12 am »

Added fix for bug and committed to CVS.
Please confirm the fix.
Logged
--- "Its Nice 2 BE Important but its more Important 2 Be NICE" ---
Follow Coppermine on Twitter

artistsinhawaii

  • VIP
  • Coppermine addict
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 856
    • evj art and photography
Re: critical error when there is a single quote in album keyword field
« Reply #4 on: September 29, 2005, 12:43:13 am »

Added fix for bug and committed to CVS.
Please confirm the fix.

Works for me. 

See additional notes on special characters in keyword fieds here:  http://forum.coppermine-gallery.net/index.php?topic=20853.msg101849#msg101849


Dennis
Logged
Learn and live ... In January of 2011, after a botched stent attempt, the doctors told me I needed a multiple bypass surgery or I could die.  I told them I needed new doctors.
Pages: [1]   Go Up
 

Page created in 0.018 seconds with 19 queries.