I am working on a patch for a secure token for Payflow Link. This involves setting a secure token on the end of the POST URL in the PayPal manager and then setting that token in the configuration of the payment section.

Comments

vinmassaro’s picture

StatusFileSize
new1.52 KB

Dave,

We reviewed the patch over email and it worked fine, except for one change: drupal_exit() is for D7 only, so this version of the patch replaces it with exit().

longwave’s picture

StatusFileSize
new1.86 KB

This patch additionally fixes an XSS vulnerability.

torgospizza’s picture

Longwave, it's like you're reading my mind or something. Would you mind contacting the security team with a note about this patch? I will help test this, if I can. I'm not sure we're actually going to be moving ahead with Payflow Link but it would be nice to have the option (and to have the module fully-functional at that time).

Thanks!

greggles’s picture

Version: » 6.x-1.1

The security team has seen this. To be honest, it's hard to review payment gateways since they require signing up with that gateway. It would be great if someone who uses the code could review it to confirm it works and doesn't have security issues.

torgospizza’s picture

Hey Greggles! Thanks for the update. I will give it a test myself as soon as I can.

hs2323’s picture

I tested this with Payflow Link and it does work. I was able to have it post the data and it all came up in the log.

vinmassaro’s picture

Can you please commit and get a new release out? Thanks!

vinmassaro’s picture

Status: Needs review » Reviewed & tested by the community
longwave’s picture

I do not have permission to commit anything here until the security team review this.

@greggles: The patch is fairly straighforward; you can see that 'uc_payflowlink_secret_token' is only set from an admin form, and only used in the response handler.

schmook’s picture

Thanks for the work on securing this module. I have a need to run PayFlow link for a legacy system.

Can someone explain to me the 'secure token'? Is it an arbitrary value? I'm not clear on how to implement the patch once applied.

Thanks!

longwave’s picture

Yes, it is an arbitrary, secret value; you set the same value in the Payflow Link manager and the Ubercart payment settings page and do not disclose it to anyone else, so it can then be used to authenticate requests from Payflow Link.

schmook’s picture

@longwave got it. All is well. Thanks!

extexan’s picture

Until the security team approves the patch, I don't see a link on the project page to download the module. Could someone who has the module send it to me (we can exchange emails in PM)?

Thanks in advance.

greggles’s picture

@longwave - conceptually this looks good to me. My memory from the issue on s.d.o is that payflow has built a feature into their system to secure the callbacks. Is this it?

It would also be great to get some feedback from the Payflow folks themselves as they distribute a different module (I haven't looked to see if it is itself secure, but they claimed it fixed this issue).

longwave’s picture

Payflow is a PayPal service; I think you are remembering a different module with a similar security issue.

There are in fact two different Payflow Link services provided by PayPal. This module implements the legacy service, although there is a newer service available that provides better compatibility with other PayPal services. Neither of the APIs seem to document any verification method for the "Silent POST" feature, but this can still be implemented with a secret token in the URL, as in the patch in this issue.

Legacy API: https://www.x.com/sites/default/files/pp_payflowlink_guide.pdf
New API: https://www.x.com/sites/default/files/payflowgateway_guide.pdf

greggles’s picture

@longwave - right you are, I was confusing this with something else.

So...I guess this is RTBC and we should re-open the project page?

longwave’s picture

Yes, please.

longwave’s picture

Bump. @greggles can you re-assign the project node to me? I think that's all that needs to happen?

greggles’s picture

Ok, did that.

lgb’s picture

Can this project be reactivated? Thank you!

longwave’s picture

Status: Reviewed & tested by the community » Fixed

Apologies, I did not see that this had been updated until now.

I have tagged 6.x-1.2 which includes this fix. It should be available from https://drupal.org/node/2045113 shortly.

Status: Fixed » Closed (fixed)

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