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

GG: /.. reported as invalid IRI #12

Closed
Toby222 opened this issue Feb 14, 2022 · 4 comments
Closed

GG: /.. reported as invalid IRI #12

Toby222 opened this issue Feb 14, 2022 · 4 comments

Comments

@Toby222
Copy link
Contributor

Toby222 commented Feb 14, 2022

Requesting the address gemini://localhost/../ returns the error gg: invalid IRI: illegal path, even though it should be a valid IRI
gemini://localhost/./...../ (arbitrarily many . at the end) works, and will return the index of localhost, if requested on a gmid server

@omar-polo
Copy link
Owner

good catch, I haven't thought about that case.

gg uses the same IRI code that gmid use, and so it performs some cleanups that are needed server-side but not on the client.

I had in mind to improve the IRI handling and separate the parsing and cleanup phases, now I have a strong reason to do that :)

@Toby222 Toby222 closed this as not planned Won't fix, can't repro, duplicate, stale Oct 12, 2023
@omar-polo
Copy link
Owner

If you don't mind, I'd keep this open. While it's not a top-priority, I still like to to eventually fix it ^^"

@Toby222 Toby222 reopened this Oct 12, 2023
@Toby222
Copy link
Contributor Author

Toby222 commented Oct 12, 2023

No problem! just went through my old stuff and removed the inactive-seeming ones

omar-polo added a commit that referenced this issue Jun 10, 2024
@omar-polo
Copy link
Owner

Took a while to fix this, oops :)

When I wrote the parser I was a bit paranoic and decided to reject altogether paths that tried to "escape" the root. However, RFC 3986 § 5.2.4 in the algorithm "remove_dot_segments" explicitly allows for it.

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

No branches or pull requests

2 participants