paulstone / flexpaper

Automatically exported from code.google.com/p/flexpaper
0 stars 0 forks source link

character escaping error in the URL #181

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. store the document file using a % character in the filename / url
2. escape the url and pass it to flexpaper

What is the expected output?
We should see the document. Here is an example URL :

http://bucket.s3.amazonaws.com/preview.swf?AWSAccessKeyId=XXX&Expires=1299282498
&Signature=QlQplPEmlJNiLztrVEzizRjhSnE%3D

What do you see instead?
Nothing, the loader keeps loading and the accessed url is incorrect :

http://bucket.s3.amazonaws.com/preview.swf?AWSAccessKeyId=XXX&Expires=1299282498
&Signature=QlQplPEmlJNiLztrVEzizRjhSnE%253

What version of the product are you using? On what operating system?
flexpaper 1.4.1
chrome 10 and 11, firefox 3, internet explorer 8 and 9

Please provide any additional information below.

Here is the escaped URL passed to flexpaper :
http%3A%2F%2Fbucket.s3.amazonaws.com%2Fpreview.swf%3FAWSAccessKeyId%3DXXX%26Expi
res%3D1299282498%26Signature%3DQlQplPEmlJNiLztrVEzizRjhSnE%253D

Original issue reported on code.google.com by fabien.j...@gmail.com on 18 Mar 2011 at 11:24

GoogleCodeExporter commented 9 years ago
The URL in your example is already escaped. FlexPaper performs encodeURI on the 
Url before accessing it. You should therefore pass your URL unescaped as such 
in your example:

SwfFile : 
unescape('http://bucket.s3.amazonaws.com/preview.swf?AWSAccessKeyId=XXX&Expires=
1299282498&Signature=QlQplPEmlJNiLztrVEzizRjhSnE%3D')

Original comment by erik.eng...@devaldi.com on 23 Mar 2011 at 1:01

GoogleCodeExporter commented 9 years ago
The Signature part is escaped but the rest of the url is not.

Following the S3 guidelines, this part has to be escaped ( see 
http://docs.amazonwebservices.com/AmazonS3/latest/dev/index.html?RESTAuthenticat
ion.html#RESTAuthenticationQueryStringAuth ).

There is something strange though : flexpaper 1.4.0 works with this kind of 
urls but not the 1.4.1

Original comment by fabien.j...@gmail.com on 25 Mar 2011 at 6:35

GoogleCodeExporter commented 9 years ago
Should be fixed in 1.4.5 final

Original comment by erik.eng...@devaldi.com on 17 Jun 2011 at 2:24

GoogleCodeExporter commented 9 years ago
I am experiencing similar issues using version 1.5.1. If I pass:
SwfFile : 
'https://some-bucket.s3.amazonaws.com/some-doc.swf?AWSAccessKeyId=AKIAJCWJYOX4TQ
IN3HGA&Expires=1331650839&Signature=aaF6Fnd7A%2BR5uVzKGYDMWB33rBQ%3D'
to flexpaper, the URL that ends up getting called is:
https://some-bucket.s3.amazonaws.com/some-doc.swf?AWSAccessKeyId=AKIAJCWJYOX4TQI
N3HGA&Expires=1331650839&Signature=aaF6Fnd7A+R5uVzKGYDMWB33rBQ=
(completely decoded). The request fails. The desired behavior is for flexpaper 
to just pass along the URL, exactly as I send it.

Original comment by cont...@anthonyputignano.com on 13 Mar 2012 at 2:58

GoogleCodeExporter commented 9 years ago
I'm seeing the same problem as Anthony.

Amazon S3 seems to not mind if the last char of the signature is encoded or not 
(= or %3D), however sometimes the Signature will have a + (%2B), which it does 
not like decoded.

FlexPaper 1.5.1 is decoding the URI, causing the request to fail.

Original comment by chat...@gmail.com on 4 Jun 2012 at 6:53

GoogleCodeExporter commented 9 years ago
Just realized you can set an EncodeURI boolean on the FlexPaper object. Setting 
this to false solved my encoding problems!

<fp:FlexPaperViewer width="100%" height="100%" Scale="1" EncodeURI="false" />

Original comment by chat...@gmail.com on 4 Jun 2012 at 7:06

GoogleCodeExporter commented 9 years ago
We are also facing the same issue with 1.5.5 and we've tried everything that 
was mentioned here with no success. Did anybody manage to get it to work?

Original comment by karim.he...@gmail.com on 18 Jul 2012 at 8:25

GoogleCodeExporter commented 9 years ago
I got it to work in version 1.5.1. I developed a Flex app using Flash Builder 
and incorporated FlexPaper through the Flex library.

Turning EncodeURI off worked for me.

Original comment by chat...@gmail.com on 18 Jul 2012 at 9:27

GoogleCodeExporter commented 9 years ago
Can you guide us how you make it work? We've tried every single combination of 
escaping, encoding and filtering the s3 url (that contains the special chars) 
and nothing worked for us.

Original comment by karim.he...@gmail.com on 19 Jul 2012 at 6:33

GoogleCodeExporter commented 9 years ago
Are you using Flash Builder to make a Flex app? Or are you using the compiled 
flash swf?

Original comment by chat...@gmail.com on 19 Jul 2012 at 4:49