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

fix: sanitise outlook safelinks #76

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

calbon2702
Copy link

Description

Python regex library used to identify safe links in URL string. String is then split to remove the safe link prefix & suffix.
From:
https://gbr01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fassets.publishing.service.gov.uk%2Fgovernment%2Fuploads%2Fsystem%2Fuploads%2Fattachment_data%2Ffile%2F955642%2FFlexible_Working_and_You.pdf&data=05%7C01%7COliver.Tillard101%40mod.gov.uk%7C734bf9940b2e4677d00d08dad83e6cf0%7Cbe7760ed5953484bae95d0a16dfa09e5%7C0%7C1%7C638060059881265012%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=8VcZC%2FGr6iJzzn5st9o1yv8DcDHBLPJXDtOaIcognxM%3D&reserved=0

To:
https%3A%2F%2Fassets.publishing.service.gov.uk%2Fgovernment%2Fuploads%2Fsystem%2Fuploads%2Fattachment_data%2Ffile%2F955642%2FFlexible_Working_and_You.pdf

Fix works in my pywb-troubleshooting environment.
https://github.com/mirrorweb/pywb-troubleshooting

Motivation and Context

TNA have asked for this here:
https://mirrorweb.zendesk.com/agent/tickets/5754

Screenshots (if appropriate):

Live:
image

pywb-troubleshooting wr:
image

pywb-troubleshooting tna:
image

Types of changes

  • Replay fix (fixes a replay specific issue)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added or updated tests to cover my changes.
  • All new and existing tests passed.

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.

2 participants