Related to this issue here: http://drupal.org/node/373492

In uc_credit.module, the hidden form value "$form['sescrd']" passed an encrypted, serialized value. When that value has quotes, it breaks the form value.

Simply adding base64_encode before the value, and then base64_decode when you read the value will fix this issue.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

rszrama’s picture

Priority: Critical » Normal
Status: Fixed » Needs review
cha0s’s picture

Version: 5.x-1.7 » 6.x-2.x-dev
Assigned: BDuell » cha0s
FileSize
1.37 KB

Does this patch fix it for you, BDuell?

Side note to dev: Why are we using $_POST['sescrd'] instead of the $form_state value?

Will backport as soon as patch is finished.

P.S. Status was set to patch (code needs review) but I didn't see an attachment. Was that a booboo?

rszrama’s picture

Thanks for the patch, cha0s. Will have to look into why I used $_POST. I think it has to do with where/when I am cleaning that data out of the session so CC data doesn't stick around any longer than it has to. Re: the status, yeah, it was posted up as "fixed" and I moved it back to needs review so someone else could review the proposal. You nailed it. : )

rszrama’s picture

As far as I can tell, this patch works. Committing now to the 2.x branch.

rszrama’s picture

Version: 6.x-2.x-dev » 6.x-2.0-beta5
Status: Needs review » Patch (to be ported)
cha0s’s picture

Status: Patch (to be ported) » Needs review
FileSize
1.94 KB
2.23 KB

Got patchies... I noticed there was another hidden form element that used sescrd, so I filled it in.

rszrama’s picture

Status: Needs review » Needs work

Since I had already committed #2, the 2.x patch in #6 failed to apply. Any way we can get a patch w/ just the changes since #2?

cha0s’s picture

Try this one.

Island Usurper’s picture

Status: Needs work » Needs review
BDuell’s picture

Looks great - thanks!!!

rszrama’s picture

Status: Needs review » Fixed

Committed to both branches.

rszrama’s picture

Status: Fixed » Needs work

So, the latest patch broke things. Reverted.

cha0s’s picture

Hmm, could you elaborate a bit on what broke? I tested this (well, I created a new patch, maybe things got murked up during the different patch parts...) and... I couldn't get it to break, checkout worked fine for me, as did the review form kicking you out if you refresh... etc.

rszrama’s picture

Going back from the checkout review form to the checkout form it was losing my CC data. The payment details section that includes the CC form just had all the fields set to empty instead of pre-populated w/ the data I entered before going to review.

cha0s’s picture

Status: Needs work » Fixed

So yeah, I spent a while digging in this one and as far as I could tell, the first patch actually makes the second patch unnecessary. So, I think this issue is fixed.

Status: Fixed » Closed (fixed)

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