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: problem in search.inc.php  (Read 5322 times)

0 Members and 1 Guest are viewing this topic.

Andi

  • VIP
  • Coppermine regular visitor
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 85
  • Join the Future
    • www.pragmamx.org
problem in search.inc.php
« on: December 12, 2004, 02:46:00 pm »

Hi :)

search.inc.php,v 1.12 2004/12/08 19:19:03 nibbler999 Exp

By clicking in the keywordmanager on one of the keywords in keywordlist, the following error occurs:
Quote
Fatal error: Cannot use string offset as an array in D:\Localhost\dev-Coppermine\vkpmx\vkpmx\html\modules\Gallery\include\search.inc.php on line 47

I've change this code from:
Code: [Select]
............
$type = " {$_POST['type']} ";

$_POST['params']['pic_hdr_ip']  = $_POST['params']['pic_raw_ip'];

if ($search_string && isset($_POST['params'])) {
$sql = "SELECT * FROM {$CONFIG['TABLE_PICTURES']} WHERE ";
$split_search = explode(' ', $search_string);
..........

to this:
Code: [Select]
.....
$type = " {$_POST['type']} ";

if ($search_string && isset($_POST['params'])) {
$_POST['params']['pic_hdr_ip']  = $_POST['params']['pic_raw_ip'];
$sql = "SELECT * FROM {$CONFIG['TABLE_PICTURES']} WHERE ";
$split_search = explode(' ', $search_string);
......

and it's ok.... ;)
« Last Edit: December 14, 2004, 07:45:06 am by GauGau »
Logged
hope, I could help you... :)

Nibbler

  • Guest
Re: problem in search.inc.php
« Reply #1 on: December 13, 2004, 02:29:14 pm »

The keywords system is not compatible with the new search yet.

Edit: should now work as of thumbnails.php v1.23
« Last Edit: December 13, 2004, 02:51:57 pm by Nibbler »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: problem in search.inc.php
« Reply #2 on: December 14, 2004, 07:44:54 am »

fix confirmed.

Joachim
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: changing search form method from "get" to "post"
« Reply #3 on: December 17, 2004, 08:57:17 am »

@Nibbler: is there any particular reason (possible security related) to change the search form method from get to post in your advanced search form for cpg1.4.x? I used to post links on my board to URLs that contained a search query (e.g. http://www.mydomain.tld/coppermine/thumbnails.php?album=search&type=full&search=foo+bar) quite often - I find this very helpfull, as I use the keywords to describe who is on the pics. Could the form method be switched back to "get" if there are no security related issues?

Joachim
Logged

Nibbler

  • Guest
Re: problem in search.inc.php
« Reply #4 on: December 17, 2004, 11:05:08 am »

It should still work with get requests, I just find posts are neater, especially with the increased amount of options being used. The url you posted works on my test gallery, do you get an error with that ?
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: problem in search.inc.php
« Reply #5 on: December 17, 2004, 06:19:48 pm »

No, the url works fine for me as well - it's just that others won't know how to create such an URL, that's why I'm suggesting to use "GET" instead of post - it's part of search form success stories, e.g. google's.

Joachim
Logged
Pages: [1]   Go Up
 

Page created in 0.031 seconds with 19 queries.