Googlebot envokes error message.

constantijnw
Joined: 19 Mar 2005

Googlebot envokes error message.

Posted:31 Oct 2009 (20:24 UTC)
Through the Admin email I get the following message:

IP: 66.249.65.247

SQL: SELECT a.`article_id`, a.`description`, a.`author_name`, a.`publish_date`, a.`expire_date`, a.`rating`, atopic.`topic_id`, atopic.`topic_name`, atopic.`has_topic_image`, atopic.`active_topic`, astatus.`status_id`, astatus.`status_name`, lch.`hits`, atype.*, lc.*, la.`attachment_id` AS `primary_attachment_id`, lf.storage_path AS `image_attachment_path` ,gks.`security_id`, gks.`security_description`, gks.`is_private`, gks.`is_hidden`, gks.`access_question`, gks.`access_answer` FROM `bwarticles` a INNER JOIN `bwliberty_content` lc ON( lc.`content_id` = a.`content_id` ) INNER JOIN `bwarticle_status` astatus ON( astatus.`status_id` = a.`status_id` ) LEFT OUTER JOIN `bwliberty_content_hits` lch ON( lc.`content_id` = lch.`content_id` ) LEFT OUTER JOIN `bwarticle_topics` atopic ON( atopic.`topic_id` = a.`topic_id` ) LEFT OUTER JOIN `bwarticle_types` atype ON( atype.`article_ty
pe_id` = a.`article_type_id` ) LEFT OUTER JOIN `bwliberty_attachments` la ON( la.`content_id` = lc.`content_id` AND la.`is_primary` = 'y' ) LEFT OUTER JOIN `bwliberty_files` lf ON( lf.`file_id` = la.`foreign_id` ) LEFT OUTER JOIN `bwgatekeeper_security_map` cg ON (lc.`content_id`=cg.`content_id`) LEFT OUTER JOIN `bwgatekeeper_security` gks ON (gks.`security_id`=cg.`security_id` ) WHERE lc.`content_type_guid` = 'bitarticle' AND (cg.`security_id` IS NULL OR lc.`user_id`='-1') AND a.`status_id` = 300 AND (( a.`publish_date` > a.`expire_date` ) OR (( a.`publish_date` < 1256974378 OR atype.`show_pre_publ` = 'y' ) AND ( a.`expire_date` > 1256974378 OR atype.`show_post_expire` = 'y' ))) AND ( atopic.`active_topic` != 'n' OR atopic.`active_topic` IS NULL ) ORDER BY `poveepqqcilnin` DESC LIMIT 0,20

ERROR CODE: Errno: 1054 Message: Unknown column 'poveepqqcilnin' in 'order clause'

Running 2.7 rc1. Can somebody explain this please?
Lester Caine
Joined: 24 Apr 2004

Re: Googlebot envokes error message.

Posted:01 Nov 2009 (08:10 UTC)
poveepqqcilnin is probably being supplied as a part of the page request. Order by provided as an selectable option, so without knowing what the actual page request was it's difficult to comment. Personally I see a lot of sql errors caused by 'hacking attempts' although I suspect this one may simply be the bot blindly creating all possible combinations of links from a page and getting some simply wrong.
constantijnw
Joined: 19 Mar 2005

Re: Googlebot envokes error message.

Posted:02 Nov 2009 (21:31 UTC)
The next day, I received another email with the same message but different seemingly random order clause.
Is it unavoidable? Is it harmless? Would prefer not receiving those kind of messages.
Will
Joined: 28 Sep 2005

Re: Googlebot envokes error message.

Posted:04 Nov 2009 (14:01 UTC)
A fix might be to augment the logic to check for valid "order by" values and return 404 on a bad request such as these.
constantijnw
Joined: 19 Mar 2005

Re: Googlebot envokes error message.

Posted:13 Nov 2009 (08:10 UTC)
Received another 'unknown column' message on this query:
SELECT bm.*, lc.`content_id`, lc.`title`, lc.`data`, lcds.`data` AS `summary`, lc.`format_guid`, lc.`last_modified`, lc.`created`, lc.`version` ,gks.`security_id`, gks.`security_description`, gks.`is_private`, gks.`is_hidden`, gks.`access_question`, gks.`access_answer` , geo.`lat`, geo.`lng`, geo.`amsl`, geo.`amsl_unit` FROM `bwgmaps` bm INNER JOIN `bwliberty_content` lc ON( lc.`content_id` = bm.`content_id` ) LEFT OUTER JOIN `bwliberty_content_data` lcds ON (lc.`content_id` = lcds.`content_id` AND lcds.`data_type`='summary') LEFT OUTER JOIN `bwgatekeeper_security_map` cg ON (lc.`content_id`=cg.`content_id`) LEFT OUTER JOIN `bwgatekeeper_security` gks ON (gks.`security_id`=cg.`security_id` ) LEFT JOIN `bwgeo` geo ON ( lc.`content_id`=geo.`content_id` ) WHERE lc.`content_type_guid` = 'bitgmap' ORDER BY lc.`gmap_id` DESC LIMIT 0,50
        1. ERROR CODE: Errno: 1054 Message: Unknown column 'lc.gmap_id' in 'order clause'
Its clear these are bugs. Indeed, there isn't any column gmap_id in the bwliberty_content table. Filed a report.