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

Fix contentURI parsing when location has any ':' #27

Closed
izqui opened this issue Aug 17, 2018 · 1 comment
Closed

Fix contentURI parsing when location has any ':' #27

izqui opened this issue Aug 17, 2018 · 1 comment

Comments

@izqui
Copy link
Contributor

izqui commented Aug 17, 2018

The way contentURI is being parsed doesn't work if the location has a : character (i.e. http:localhost:8080/foo), because we parse it doing a naïve contentURI.split(':') and just use the first and second items in the array.

We should only take into account the first occurrence of : and return everything after it as location.

See aragon/aragon-cli#171

@izqui izqui assigned izqui and unassigned izqui Aug 17, 2018
0x-r4bbit added a commit to 0x-r4bbit/apm.js that referenced this issue Aug 17, 2018
Prior to this commit, all content URIs of application versions are
expected to follow the format `<provider>:<identifier>`. In case a
content URI doesn't follow this format, an error is thrown.

We now ensure that in such cases, the code still executes but resolves
early with an error or warning respectively.

It also fixes aragon#27 where parsing content URIs that contain more than
one split character (e.g. `:` in `http://localhost:8080/foo/bar`) splits
the `identifier` as well (which we don't want).

Fixes aragon#20, aragon#27
@0x-r4bbit
Copy link
Contributor

This will be fixed with #26

@izqui izqui closed this as completed in d53212f Aug 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants