node.module:521 - node_load()

foreach ($param as $key => $value) {
   $cond[] = 'n.'. db_escape_string($key) ." = '%s'";
   $arguments[] = $value;
}

As $key is not used in a string context (surrouned by ''),
db_escape_string is useless. (initial report by Heine).

Comments

AjK’s picture

Status: Active » Needs review
StatusFileSize
new690 bytes

And the patch.

AjK’s picture

Status: Needs review » Reviewed & tested by the community

As per originating issue, changing to RTBC.

gábor hojtsy’s picture

Version: 6.0 » 5.x-dev

Applicable to 5.x and 7.x as well. Moving back to 5.x but also need to be committed to 7.x then.

gábor hojtsy’s picture

(I committed to 6.x.).

heine’s picture

For the record, the initial report was by Stefan Esser, Mayflower & Zend in an audit commissioned by Die Zeit.

hswong3i’s picture

StatusFileSize
new780 bytes
drumm’s picture

Version: 5.x-dev » 7.x-dev

Committed to 5.x.

catch’s picture

Status: Reviewed & tested by the community » Needs work

This no longer applies, but it's going to be obsolete after #225450: Database Layer: The Next Generation gets in anyway.

dmitrig01’s picture

Status: Needs work » Reviewed & tested by the community
StatusFileSize
new1000 bytes

Since it was RTBC before, this is a re-roll, and this is not a huge patch, marking RTBC again

dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD. Thanks!

Anonymous’s picture

Status: Fixed » Closed (fixed)

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