Skip to content

Conversation

@GiorgioUtzeri
Copy link
Contributor

@GiorgioUtzeri GiorgioUtzeri commented Nov 14, 2025

🐛 [FIX] Normalize malformed referrer URLs missing double slash

Some external requests send a malformed referrer such as:

  • http:/pod.univ-lille.fr/...
  • https:/pod.univ-lille.fr/...

These URLs have a missing slash after the scheme (:/ instead of ://), and Pod never generates them internally.
They currently trigger SuspiciousOperation("referrer is not internal"), causing unnecessary admin error emails.

This PR adds a minimal and safe normalization:

  • https:/…https://…
  • http:/…http://…

Nothing else is changed.

Before sending your pull request, make sure the following are done

  • You have read our contribution guidelines.
  • Your PR targets the dev_v4 branch.
  • Your PR status is in draft if it’s still a work in progress.

@GiorgioUtzeri GiorgioUtzeri changed the title 🐛 Normalize malformed referrer URLs missing double slash 🐛 [FIX] Normalize malformed referrer URLs missing double slash Nov 14, 2025
@Badatos Badatos added this to the 4.x milestone Nov 14, 2025
Copy link
Collaborator

@Badatos Badatos left a comment

Choose a reason for hiding this comment

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

Merci pour ce fix rapide ;)

Copy link
Collaborator

@LoicBonavent LoicBonavent left a comment

Choose a reason for hiding this comment

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

Nickel, merci !

@Badatos Badatos merged commit cf86591 into EsupPortail:dev_v4 Nov 21, 2025
2 of 3 checks 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.

3 participants