-
Notifications
You must be signed in to change notification settings - Fork 2
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
Webmention endpoint resolution failing when there are multiple link
s in header
#41
Comments
Thanks for the report - will be fixed in next release. |
beatonma
added a commit
that referenced
this issue
Oct 5, 2022
- Resolves [#38](#38): Revalidate target URLs when handling pending mentions - Should be unnecessary generally (they are also validated at discovery time when parsed from HTML) but important if validation checks are updated. - Resolves [#41](#41): Find correct endpoint when multiple `link`s in HTTP header. - Added `settings.WEBMENTIONS_INCOMING_TARGET_MODEL_REQUIRED` \[`bool` | default=`False`]. If `True`, incoming mentions are only accepted if their target resolves to a `MentionableMixin` instance. - Added `settings.WEBMENTIONS_ALLOW_SELF_MENTIONS` \[`bool` | default=`True`]. - If `False`, outgoing links that target your own domain (as specified by `settings.DOMAIN_NAME`) will be ignored - you will only submit mentions to other domains. - If `True`, outgoing links that use a relative path (e.g. `href="/article/1/"`) are now supported.
beatonma
added a commit
that referenced
this issue
Oct 5, 2022
- Resolves [#38](#38): Revalidate target URLs when handling pending mentions - Should be unnecessary generally (they are also validated at discovery time when parsed from HTML) but important if validation checks are updated. - Resolves [#41](#41): Find correct endpoint when multiple `link`s in HTTP header. - Added `settings.WEBMENTIONS_INCOMING_TARGET_MODEL_REQUIRED` \[`bool` | default=`False`]. If `True`, incoming mentions are only accepted if their target resolves to a `MentionableMixin` instance. - Added `settings.WEBMENTIONS_ALLOW_SELF_MENTIONS` \[`bool` | default=`True`]. - If `False`, outgoing links that target your own domain (as specified by `settings.DOMAIN_NAME`) will be ignored - you will only submit mentions to other domains. - If `True`, outgoing links that use a relative path (e.g. `href="/article/1/"`) are now supported.
beatonma
added a commit
that referenced
this issue
Oct 5, 2022
- Resolves [#38](#38): Revalidate target URLs when handling pending mentions - Should be unnecessary generally (they are also validated at discovery time when parsed from HTML) but important if validation checks are updated. - Resolves [#41](#41): Find correct endpoint when multiple `link`s in HTTP header. - Added `settings.WEBMENTIONS_INCOMING_TARGET_MODEL_REQUIRED` \[`bool` | default=`False`]. If `True`, incoming mentions are only accepted if their target resolves to a `MentionableMixin` instance. - Added `settings.WEBMENTIONS_ALLOW_SELF_MENTIONS` \[`bool` | default=`True`]. - If `False`, outgoing links that target your own domain (as specified by `settings.DOMAIN_NAME`) will be ignored - you will only submit mentions to other domains. - If `True`, outgoing links that use a relative path (e.g. `href="/article/1/"`) are now supported.
Fixed in |
Thank you! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When sending a webmention to a site that returns multiple
link
s in the header, the resolved endpoint URL gets mashed together with otherlink
values. For example, if the site returns a header like this:The URL endpoint resolves as:
I think it has something to do with the regex in the _get_endpoint_in_http_headers function; if the string "webmention" is found in the headers, it looks like it might be matching everything from the
https
at start of the first URL until it finds the webmention URL?The text was updated successfully, but these errors were encountered: