Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught URIError: URI malformed #28

Closed
JobaDiniz opened this issue Aug 14, 2014 · 9 comments · Fixed by #35
Closed

Uncaught URIError: URI malformed #28

JobaDiniz opened this issue Aug 14, 2014 · 9 comments · Fixed by #35

Comments

@JobaDiniz
Copy link
Contributor

The following value of a cookie is throwing error:

%7B%22mediaUrl%22%3A%22http%3A//ireland1.cutvmanifest.api.ottcloudservices.com/smooth/M1_SS/1407418200-1407421680/manifest%22%2C%22laUrl%22%3A%22http%3A//license.totalmovie.com/playready/rightsmanager.asmx%22%2C%22programId%22%3A%22LSC_SAN_19_10497509%22%2C%22programName%22%3A%22Az%20%E9let%20megy%20tov%E1bb%22%2C%22channelId%22%3A%22LCH_SAN_19_2%22%2C%22channelName%22%3A%22M1%22%2C%22mode%22%3A%22normal%22%2C%22castAvailable%22%3Atrue%2C%22chromecast%22%3A%22%22%2C%22castingDevice%22%3A%22%22%2C%22playing%22%3Atrue%7D

The line is:

value = decodeURIComponent(cookie.substring(pos + 1));
@ivpusic
Copy link
Owner

ivpusic commented Aug 19, 2014

cannot reproduce :(

@JobaDiniz
Copy link
Contributor Author

Really? I had to change the source code, adding a try-catch because it is failling all the time

@ivpusic
Copy link
Owner

ivpusic commented Aug 19, 2014

I just tested it on chrome 36 and it works fine :/

@JobaDiniz
Copy link
Contributor Author

I'll try to create a plunker later.

On Tue, Aug 19, 2014 at 5:00 PM, Ivan Pusic notifications@github.com
wrote:

I just tested it on chrome 36 and it works fine :/


Reply to this email directly or view it on GitHub
#28 (comment)
.

Atenciosamente,
Joberto Diniz
jobertodiniz.com

@JobaDiniz
Copy link
Contributor Author

I thought was that value, but turns out it is other value. I deleted all my cookies and it's not throwing errors now.
None of my cookies values are throwing this error. It must be another cookie set by another app. Since I deleted all of them, I can't know now which one was giving error.

But the problem exists. Maybe it will take some time until I find the source value that gives this error.

@ivpusic
Copy link
Owner

ivpusic commented Aug 20, 2014

Thank you!

If you find problem please reopen this issue, or open new one.

@ivpusic ivpusic closed this as completed Aug 20, 2014
@JobaDiniz
Copy link
Contributor Author

Man, it's this value:

%7B%22mediaUrl%22%3A%22http%3A//service01-live.connectmedia.hu/6632/ba9f4e70971c6e1724d4f4a2fda37515/53f629d9/stream0009.isml/Manifest%22%2C%22offset%22%3A%2244%22%2C%22laUrl%22%3A%22http%3A//license.totalmovie.com/playready/rightsmanager.asmx%22%2C%22programId%22%3A%22LCH_SAN_19_26%22%2C%22programName%22%3A%22H%EDrad%F3%22%2C%22channelId%22%3A%22LCH_SAN_19_26%22%2C%22channelName%22%3A%22DUNA%20WORLD%22%2C%22mode%22%3A%22normal%22%2C%22castAvailable%22%3Atrue%2C%22chromecast%22%3A%22%22%2C%22castingDevice%22%3A%22%22%2C%22playing%22%3Atrue%7D

I'm pretty sure.

@tdakhla
Copy link

tdakhla commented Oct 16, 2014

+1.

At the very minimum, there should be a try/catch around the decodeURIComponent call, because trying to decode values such as http://some-external-server.com/info?progress=60%%20-%20Completed will fail.

Even Angular uses a try/catch when parsing QS key/value pairs: https://github.com/angular/angular.js/blob/6502ab09774e1ac310da90c9e1c49fb0cd652d66/src/Angular.js#L1075

@ivpusic
Copy link
Owner

ivpusic commented Oct 16, 2014

+1. can you send pull request with this enhancement?

@JobaDiniz JobaDiniz mentioned this issue Oct 17, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants