A module version can be NULL value. When calculating message hmac before sending it to the AN this value is serialized (within _acquia_agent_hmac()) as NULL. After going through XML-RPC the value turns from NULL into an empty string. So when the hmac is then calculated on the server side to check the message authenticity the value serialized as empty string and validation fails.

Probably a more general solution is required here. If Drupal XML-RPC API understand NULL values there would be no such problem.

Comments

pwolanin’s picture

Good catch - this possibility was nagging at my mind. Probably we should use a ternary, since otherwise we may generate a notice? Or is that array key actually assigned a NULL value?

pwolanin’s picture

StatusFileSize
new763 bytes

This falls back to the core version - which is mostly what we care about anyhow.

pwolanin’s picture

Version: 7.x-1.0-beta1 » 6.x-1.x-dev
Status: Needs review » Patch (to be ported)

committed to 7.x. We need to send the extra info in 6.x too.

pwolanin’s picture

Title: There should be no NULL values in the data that is sent to AN via XML-RPC » send search module versions in the data that is sent to AN via XML-RPC (and make sure no no NULL values)
Status: Patch (to be ported) » Needs review
StatusFileSize
new1.34 KB

Here's a pass at a 6.x version

pwolanin’s picture

Version: 6.x-1.x-dev » 7.x-1.0
StatusFileSize
new1.16 KB

Looking at the 7 code, we could make better use of API functions. Here's a new version.

pwolanin’s picture

Version: 7.x-1.0 » 6.x-1.x-dev

committed #6 to 7.x

pwolanin’s picture

Status: Needs review » Fixed

committed #5 to 6.x.

Status: Fixed » Closed (fixed)

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