node_load function in node.module does not call drupal_unpack after retrieving node and author user informations.

author user 'data' field is thus still serialized, and author prefs cannot be accessed as usual.

this leads to issues on modules using node's author 'data' fields (link hook in privatemsg, which access author prefs to display link or not).

the drupal_unpack is done in 4.6, but not in head, and this is not described as a change on the update module handbook page, so i'm submitting this potential issue.

patch to add the missing call is attached (this fixes the issue with privatemsg link hook).

please review and apply the patch if necessary.

CommentFileSizeAuthor
node_load-unpackfix.patch855 bytessyllance

Comments

Bèr Kessels’s picture

Status: Needs review » Needs work

Should we not only unpatch the parts that are potentially packed.

So instead of a $node = unpack($node), do a
$node->data = unpack($node->data) and same for $node->user->data ?

Please change the patch status back If I am completely mistaken.

Jaza’s picture

Version: x.y.z » 6.x-dev

This is possibly still an issue in 6.x (personally, I think we should remove serialized fields such as $node->data from core).

Anyway.. moving.

ricabrantes’s picture

Status: Needs work » Closed (fixed)

I can´t find this bug.. closed