-
Notifications
You must be signed in to change notification settings - Fork 114
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
URLs compromised under Windows #331
Comments
Hey @bneumann thanks for reporting this. What version of zetta are you using with that tutorial? |
Hey @bneumann just looked at the repo you refer to, and it was using very old versions of zetta and the mock packages. I've updated them to latest. Can you let me know if that changes anything for you? I don't have a windows system to test with currently. |
Hi, |
@AdamMagaluk Have access to a windows box? Would you be able to make a pass at a fix? |
I would fix it if you could push me in the right direction. I browsed trhough the zetta code and did not find the correct file where the magic formatting happens |
@AdamMagaluk @mdobson It would help to look for any parsed.pathname = path.join(parsed.pathname, pathname).replace(/\\/g, '/'); |
Sure @bneumann. I'd be more than happy to offer some guidance. The API server underlying zetta is a package called The As @kevinswiber mentioned above a good starting point is this line. https://github.com/argo/argo-url-helper/blob/master/url.js#L29 |
Here's a case where it will fail: Line 276 in d3b3727
|
@kevinswiber Ah so I was already in the right spot. But tbh I was a bit confused what these modules do. But thanks to the explanation of @AdamMagaluk that it is a middlewary kind of thing I can take a deeper look into it. I let you know what I find out. Thanks for the tips! |
Great! Let us know if you have any other questions. |
Okay I made 2 pull requests on the two repositories. It is currently building, but it works now on my machine. Thanks guys! |
Fixed with #332 new release coming. |
@bneumann It's fixed in [email protected] |
Following workflow:
checkout helloworld git repo:
https://github.com/zettajs/zetta-hello-world
Build and run under Windows 10. Goto http://localhost:1337 Following json appears:
{ rel: [ "self", "edit" ], href: "http://localhost:1337/\servers\FirstName%20LastName\devices\9e967da5-bac2-4fff-b2ff-3541385ccf51" }, { rel: [ "http://rels.zettajs.io/type", "describedby" ], href: "http://localhost:1337/\servers\FirstName%20LastName/meta/state_machine" }, { title: "FirstName LastName", rel: [ "up", "http://rels.zettajs.io/server" ], href: "http://localhost:1337/\servers\FirstName%20LastName" }
If I run the same under linux I revceive correct URLS:
http://localhost:1337/servers/FirstName%20LastName
Problem is, that the REST API is broken without correct links and the Zetta Browser does not show anything
The text was updated successfully, but these errors were encountered: