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

False Positive when URL ends in 'amp' and has query params #16

Open
haganbmj opened this issue Jan 4, 2023 · 1 comment
Open

False Positive when URL ends in 'amp' and has query params #16

haganbmj opened this issue Jan 4, 2023 · 1 comment

Comments

@haganbmj
Copy link

haganbmj commented Jan 4, 2023

Observed here: https://www.reddit.com/r/mtgcube/comments/103dc4d/is_it_just_me_or_do_people_seem_to_be/j2y91j1/

Then attempted to verify the behavior using https://www.amputatorbot.com/
It appears to be a false positive occurring when the url ends in amp and has query params trailing that.

Flagged:

https://scryfall.com/card/clb/870/skullclamp?utm_source=mtgcardfetcher

Not Flagged:

https://scryfall.com/card/clb/870/skullclamp
https://scryfall.com/card/clb/870/skullclamps?utm_source=mtgcardfetcher

And then interestingly this errors out with a 500 on the website:

https://scryfall.com/card/clb/870/skullclamp?
@cls
Copy link

cls commented Feb 8, 2023

Also observed here: https://www.reddit.com/r/spikes/comments/10w6odm/standard_phyrexia_all_will_be_one_whats_working/j7m673l/

Flagged:

https://scryfall.com/card/one/147/sawblade-scamp?utm_source=mtgcardfetcher

The matching substrings look to be listed in static/static.txt:

AMP_KEYWORDS = ["/amp", "amp/", ".amp", "amp.", "?amp", "amp?", "=amp",
                "amp=", "&amp", "amp&", "%amp", "amp%", "_amp", "amp_"]

So basically amp preceded or followed by one of /.?=&%_. It doesn't surprise me that there are false positives — I would expect it to at least look at both sides of the amp.

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