You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Mason Harding <ma...@fivi.com> on 2013/04/17 19:36:44 UTC

Payment method security

Hello.  I am looking at the page
/ecommerce/control/updateCheckoutOptions/quickcheckout, and see that you
can set a "checkOutPaymentId" that is posted to /ecommerce/control/checkout.
I've followed the code all the way to the payment gateway, but don't see
any security verifying that the user didn't change the checkOutPaymentId to
one that is not their own before posting.  I assume I am missing
something?

Thanks,
Mason

Re: Payment method security

Posted by Jacques Le Roux <ja...@les7arts.com>.
Yes, but what value the user would put in checkOutPaymentId?
I mean how would he know what to put there?
It must be a valid value for a PaymentMethod.
Of course s/he could try to hack, generating random numbers. 
But it's quite complicated since you woul have to checkout with each generated numbers until you get one corresponding to the right PaymentMethod...

Anyway, if not already done, we could indeed check that this value is not changed.
You could create a Jira, attaching a patch would be appreciated, we could use a session attribute for that.

Jacques

From: "Mason Harding" <ma...@fivi.com>
> Well it is data that is posted by the user, so they could send whatever
> they want.  I think the easiest way would be to use Firebug to change the
> value of "checkOutPaymentId" to a different value, click on that radio
> input, and submit the form.  They could also use Curl, or write a simple
> program to post values after logging in and fetching the cookie.
> 
> 
> On Sat, Apr 20, 2013 at 8:03 AM, Jacques Le Roux <
> jacques.le.roux@les7arts.com> wrote:
> 
>> Reversing the question: how would the user change it?
>>
>> Jacques
>>
>> From: "Mason Harding" <ma...@fivi.com>
>> > Hello.  I am looking at the page
>> > /ecommerce/control/updateCheckoutOptions/quickcheckout, and see that you
>> > can set a "checkOutPaymentId" that is posted to
>> /ecommerce/control/checkout.
>> > I've followed the code all the way to the payment gateway, but don't see
>> > any security verifying that the user didn't change the checkOutPaymentId
>> to
>> > one that is not their own before posting.  I assume I am missing
>> > something?
>> >
>> > Thanks,
>> > Mason
>> >
>>
>

Re: Payment method security

Posted by Mason Harding <ma...@fivi.com>.
Well it is data that is posted by the user, so they could send whatever
they want.  I think the easiest way would be to use Firebug to change the
value of "checkOutPaymentId" to a different value, click on that radio
input, and submit the form.  They could also use Curl, or write a simple
program to post values after logging in and fetching the cookie.


On Sat, Apr 20, 2013 at 8:03 AM, Jacques Le Roux <
jacques.le.roux@les7arts.com> wrote:

> Reversing the question: how would the user change it?
>
> Jacques
>
> From: "Mason Harding" <ma...@fivi.com>
> > Hello.  I am looking at the page
> > /ecommerce/control/updateCheckoutOptions/quickcheckout, and see that you
> > can set a "checkOutPaymentId" that is posted to
> /ecommerce/control/checkout.
> > I've followed the code all the way to the payment gateway, but don't see
> > any security verifying that the user didn't change the checkOutPaymentId
> to
> > one that is not their own before posting.  I assume I am missing
> > something?
> >
> > Thanks,
> > Mason
> >
>

Re: Payment method security

Posted by Jacques Le Roux <ja...@les7arts.com>.
Reversing the question: how would the user change it?

Jacques

From: "Mason Harding" <ma...@fivi.com>
> Hello.  I am looking at the page
> /ecommerce/control/updateCheckoutOptions/quickcheckout, and see that you
> can set a "checkOutPaymentId" that is posted to /ecommerce/control/checkout.
> I've followed the code all the way to the payment gateway, but don't see
> any security verifying that the user didn't change the checkOutPaymentId to
> one that is not their own before posting.  I assume I am missing
> something?
> 
> Thanks,
> Mason
>