Skip to content

Remove stray errorUrl from Pinterest (fails data.schema.json)#3034

Open
hydrogen2 wants to merge 1 commit into
sherlock-project:masterfrom
hydrogen2:fix/pinterest-schema-errorurl
Open

Remove stray errorUrl from Pinterest (fails data.schema.json)#3034
hydrogen2 wants to merge 1 commit into
sherlock-project:masterfrom
hydrogen2:fix/pinterest-schema-errorurl

Conversation

@hydrogen2

Copy link
Copy Markdown

What

Removes the errorUrl field from the Pinterest entry in data.json.

Why

Pinterest uses errorType: status_code, but also carries an errorUrl — a field
that is only meaningful for response_url detection. Because of this, the entry fails
the repository's own data.schema.json: the status_code branch of the schema's
oneOf does not permit errorUrl.

Reproduction (before this change):

import json, jsonschema
d = json.load(open("sherlock_project/resources/data.json"))
s = json.load(open("sherlock_project/resources/data.schema.json"))
jsonschema.validate(d, s)
# -> ValidationError: 'response_url' was expected ... on instance['Pinterest']['errorType']

After this change, jsonschema.validate(...) passes.

Behavior impact

None. errorUrl is not read by sherlock.py for status_code sites (it is only used
by response_url detection, which this site does not use). Pinterest detection is
unchanged; the manifest simply becomes schema-valid again.

Pinterest uses errorType: status_code, but also carried an errorUrl, a
field only used by response_url detection. This makes the entry fail the
repo's own data.schema.json (the status_code branch of the oneOf forbids
errorUrl). The field is never read by sherlock.py for status_code sites,
so removing it changes no behavior and makes the manifest schema-valid.
@github-actions

Copy link
Copy Markdown
Contributor

Automatic validation of changes

Target F+ Check F- Check
Pinterest ✔️   Pass ✔️   Pass

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

Successfully merging this pull request may close these issues.

1 participant