Cron function Undefined table alias fix patch

sinasalek - May 12, 2008 - 17:41
Project:Quick Edit (Batch Edit)
Version:5.x-1.0-beta1
Component:Code
Category:bug report
Priority:critical
Assigned:sinasalek
Status:closed
Description

Hi,
I have no idea what's the usage of the cron function, but what ever it is, it doesn't work due to this bug.
I attached the patch.

BTW : Your module is perfect for mass editing thanks for sharing it. keep up the good work ;)

#1

sinasalek - May 17, 2008 - 11:20

Well, i guess this is a bug. because whenever i run cron, it publishes all the unpublished contents!

#2

Summit - May 20, 2008 - 13:39

Hi,

I do not see the patch please...subscribing, greetings, Martijn

#3

sinasalek - May 21, 2008 - 17:40

There is no need for patch anymore since it cause some problems if it works. i guess it's a security issue because according to code :
It first select all the nodes that are non published and has been created before the current time (Which mean it selects all the nodes!)

$result = db_query("SELECT nid FROM {node} as n WHERE n.created <= %d AND n.status = 0", time());

And then it publish all the nodes and update their change time.
db_query('UPDATE {node} SET status = 1, changed = %d WHERE nid IN(%s)', time(), implode(',', $nids));

So if you have any unpublished nodes, this module will definitely publish them all, and anyone can see them.

sina.salek.ws, CIO & Lead developer
Feel freedom with open source softwares

#4

sinasalek - May 21, 2008 - 17:43
Priority:normal» critical

Changing to critical and a patch for remove the function.
You can also manually remove qedit_cron function.

AttachmentSize
cron security patch.patch664 bytes

#5

jimyhuang - June 30, 2008 - 12:52
Status:patch (code needs review)» fixed

Thanks for review, this is my fault that modified other module but forgot to remove unecessery function.
Commit to nightly snapshot.

#6

Anonymous (not verified) - July 14, 2008 - 12:53
Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.