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

url: fix .title vs url callback plugins #2282

Merged
merged 1 commit into from
Jun 3, 2022

Conversation

half-duplex
Copy link
Member

@half-duplex half-duplex commented May 16, 2022

  • .title for e.g. reddit would say "Sorry, couldn't title that" followed by the reddit.py callback output
  • last_seen_url (therefore .title sans args) was missing callback'd/excluded URLs
  • tighten some security dumbs (except the safety part in safety: rework #2279)
    • no point in checking ip without DNS lookups if an attacker has $5 and a namecheap account
  • add type hints
  • some other tidying.

Related for some remaining issues: #2281
Fixes #2054
Fixes #2055

Checklist

  • I have read CONTRIBUTING.md
  • I can and do license this contribution under the EFLv2
  • No issues are reported by make qa (runs make quality and make test)
  • I have tested the functionality of the things this change touches

@half-duplex half-duplex added Bugfix Generally, PRs that reference (and fix) one or more issue(s) Housekeeping Code cleanup, removal of deprecated stuff, etc. labels May 16, 2022
@half-duplex half-duplex added this to the 8.0.0 milestone May 16, 2022
@half-duplex half-duplex force-pushed the url-excluded-fails branch from d22decc to e629693 Compare May 16, 2022 07:04
sopel/modules/url.py Outdated Show resolved Hide resolved
@half-duplex half-duplex force-pushed the url-excluded-fails branch from 47cc9ad to 5ed14c2 Compare May 16, 2022 18:09
@half-duplex
Copy link
Member Author

RE_DCC - Seems to strip "dcc send". Should this ever matter? DCC is CTCP only, and title responses should never be sent as CTCP, right?

@Exirel
Copy link
Contributor

Exirel commented May 25, 2022

Given that you are fixing an issues, that's pretty impressive work. I like that every time you work on something, you make it more clear for me and give me better ideas than I had for future refactoring.

So all in all, good job.

Copy link
Contributor

@Exirel Exirel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly style nitpicks. All the complains I have about process_urls come from the complexity of the feature that has outgrow the old interface that was put in place (probably by me at some point).

So this is now in my "refactoring" bucket, and clearly not in the near future because, as I already said: this PR is a damn good work.

sopel/modules/url.py Outdated Show resolved Hide resolved
sopel/modules/url.py Show resolved Hide resolved
sopel/modules/url.py Outdated Show resolved Hide resolved
@Exirel
Copy link
Contributor

Exirel commented May 26, 2022

Is there a reason for this PR to still be a draft? It looks pretty good to me. Did I forget something?

@half-duplex
Copy link
Member Author

I was going to remove the DCC thing if we can't figure out why it's there, but I guess that's stretching the scope a bit.

@half-duplex half-duplex marked this pull request as ready for review May 26, 2022 15:18
@dgw
Copy link
Member

dgw commented Jun 1, 2022

I wouldn't mind removing the seemingly useless DCC regex, but I'll merge this regardless of whether that's included by the time I get to its place in the test/review queue.

@half-duplex half-duplex force-pushed the url-excluded-fails branch from 9aabcf7 to 7fc8f76 Compare June 1, 2022 17:35
Also a bunch of misc cleaning
@half-duplex half-duplex force-pushed the url-excluded-fails branch from 7fc8f76 to a3fdb72 Compare June 1, 2022 17:39
@dgw dgw merged commit 02564b3 into sopel-irc:master Jun 3, 2022
@dgw
Copy link
Member

dgw commented Jun 3, 2022

by the time I get to its place in the test/review queue.

I did. It passed my gauntlet. 🎉

@half-duplex half-duplex deleted the url-excluded-fails branch June 3, 2022 03:33
@half-duplex half-duplex restored the url-excluded-fails branch May 14, 2023 02:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bugfix Generally, PRs that reference (and fix) one or more issue(s) Housekeeping Code cleanup, removal of deprecated stuff, etc.
Projects
None yet
3 participants