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

adds postgres constraint to prevent circular URIs #72

Merged
merged 1 commit into from
May 26, 2021

Conversation

mattoberle
Copy link
Contributor

This commit addresses an edge case where Amphora may allow a URI like this to be created:

-[ RECORD 1 ]------------------------------------------------------
id   | example.com/_uris/ZXhhbXBsZS5jb20vZXhhbXBsZQ==
data | example.com/_uris/ZXhhbXBsZS5jb20vZXhhbXBsZQ==
url  | example.com/example

Visiting https://example.com/example would result in an infinite redirect.

This commit addresses an edge case where Amphora may allow a URI like this to be created:

```
-[ RECORD 1 ]------------------------------------------------------
id   | example.com/_uris/ZXhhbXBsZS5jb20vZXhhbXBsZQ==
data | example.com/_uris/ZXhhbXBsZS5jb20vZXhhbXBsZQ==
url  | example.com/example
```

Visiting `https://example.com/example` would result in an infinite redirect.
@mattoberle mattoberle added the bug Something isn't working label Apr 29, 2021
@james-owen james-owen merged commit 9a793d7 into master May 26, 2021
@james-owen james-owen deleted the prevent-circular-uris branch May 26, 2021 19:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants