%0A Throws 403 Error on AmazonIPN.ashx

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
marty@web2market
Ensign (ENS)
Ensign (ENS)
Posts: 5
Joined: Fri Apr 27, 2012 11:27 am

%0A Throws 403 Error on AmazonIPN.ashx

Post by marty@web2market » Fri Jul 26, 2013 11:45 am

I have ported the Amazon payment gateway down from Gold to 7 and everything seems to work other than the AmazonIPN page that amazon redirects back to after processing the payment on Amazon's site. The URL has a "%0A" in it and that causes the server to throw an error. We do not experience this problem on AbleCommerce Gold, even though both sites are running on servers with the exact same configuration. We have tried everything we can think of but still haven't gotten it to accept the characters "%0A"...Any ideas?

User avatar
Shopping Cart Admin
AbleCommerce Admin
AbleCommerce Admin
Posts: 3055
Joined: Mon Dec 01, 2003 8:41 pm
Location: Vancouver, WA
Contact:

Re: %0A Throws 403 Error on AmazonIPN.ashx

Post by Shopping Cart Admin » Fri Jul 26, 2013 1:33 pm

Don't know about the error, but I'm certain that this is a violation of our licensing, you cannot just 'take' code from GOLD and use it for other purposes.
Thanks for your support

Shopping Cart Guru
AbleCommerce.com
Follow us on Facebook

User avatar
gjaros
AbleCommerce Partner
AbleCommerce Partner
Posts: 1717
Joined: Tue Feb 24, 2004 2:20 pm
Location: Illinois
Contact:

Re: %0A Throws 403 Error on AmazonIPN.ashx

Post by gjaros » Fri Jul 26, 2013 3:23 pm

Marty didn't mean that we had just taken AC code and tried it on AC7, he meant that he was building a customization into AC7 that would handle Amazon payments similar to how AC Gold does. I'll add a bit more information about what we're experiencing.

We actually haven't written any of the actual order processing code at all yet because AC7 returns a 403 error caused by the url encoded line feed and carriage return characters in the querystring returned by Amazon. We've written code that submits the order to Amazon (using not just the AC Gold functionality, but also similar code that we've written for other payment handlers in the past as a guide) and that portion of our customization appears to be working fine. Amazon processes the payment and then returns back to our 'listener' page with the payment confirmation details. We expect to take that querystring and parse it to update the order information in AC appropriately, nothing challenging or groundbreaking there.

The problem we are experiencing is that the querystring returned from Amazon has %0A (a url encoded line feed character) in it. This is causing the site to respond with a 403 error. This actually has nothing to do with Amazon or any code that we've written. You can add ?%0A to any URL on any AC7 site and you get the same error (try it on your site: http://www.ablecommerce.com/Shopping-Ca ... 0.aspx?%0A ). A url encoded carriage return character also causes the error ( %0D ). Other url encoded characters are fine. ACGold sites don't return the 403 error when url encoded line feeds or carriage returns.

Even a completely blank fine, given a .aspx extension, causes the error with %0A in the querystring, so it's not related to any code. And it's not related to IIS settings since our AC7 and ACGold sites are all configured the same.

So what we're wondering is if there is anything in the AC7 DLLs that are preventing these characters from being allowed in the querystring. Something that handles the page before any bit of code runs. And is there any way to avoid or fix this error?
Image
Image

Post Reply