Skip to content

feat: make signature generation more flexible by allowing relative URLs#142

Open
MichaelBrauner wants to merge 5 commits into
SymfonyCasts:mainfrom
MichaelBrauner:email-signature-verification-without-domain
Open

feat: make signature generation more flexible by allowing relative URLs#142
MichaelBrauner wants to merge 5 commits into
SymfonyCasts:mainfrom
MichaelBrauner:email-signature-verification-without-domain

Conversation

@MichaelBrauner

@MichaelBrauner MichaelBrauner commented May 5, 2023

Copy link
Copy Markdown

Here is the PR regarding this issue: #136

In the current implementation, the UriSigner always generates an absolute URL when signing. However, this might not be the desired behavior in some cases.

This PR adds a configuration option (use_relative_path) to allow the use of relative URLs when generating signatures. By default, the option is set to false, which maintains the existing behavior of generating absolute URLs.

@MichaelBrauner MichaelBrauner changed the title Email signature verification without domain Make signature generation more flexible by allowing relative URLs May 5, 2023
@eidenschink

Copy link
Copy Markdown

This configuration option would be great. I have a use case where I want to target to a completely different host running on another framework; the hosts endpoint then proxies the request (or rather re-creates it) to the Symfony Controller.
If only the relative path is signed I can simply make the necessary hostname change in the TWIG template.

@shakaran

Copy link
Copy Markdown

@MichaelBrauner could you rebase for resolve the conflicts? Thanks

@MichaelBrauner MichaelBrauner force-pushed the email-signature-verification-without-domain branch 2 times, most recently from b434387 to 93d5392 Compare June 2, 2025 06:23
@MichaelBrauner MichaelBrauner changed the title Make signature generation more flexible by allowing relative URLs feat: make signature generation more flexible by allowing relative URLs Jun 3, 2025
@MichaelBrauner MichaelBrauner force-pushed the email-signature-verification-without-domain branch from 93d5392 to 90ec899 Compare June 3, 2025 20:09
@MichaelBrauner

Copy link
Copy Markdown
Author

Hi, this PR is now ready for review.

However, I wasn't able to run the test suite locally – vendor/bin/simple-phpunit fails with:

Trait "Symfony\Bridge\PhpUnit\Legacy\PolyfillAssertTrait" not found in Assert.php

I tried with PHP 8.1 and 8.2, removed and reinstalled the vendor folder and the PHPUnit Bridge multiple times, but no success.
Maybe you could verify if the test suite runs on your end?

Thanks!

@MichaelBrauner MichaelBrauner marked this pull request as ready for review June 3, 2025 20:14
@MichaelBrauner

Copy link
Copy Markdown
Author

Can you rerun the checks?
It should pass: https://github.com/MichaelBrauner/verify-email-bundle/actions/runs/15507669530

@bocharsky-bw

Copy link
Copy Markdown
Member

Sorry for the delay.

I reran the CI, but we still have errors here

@melbings

Copy link
Copy Markdown

@bocharsky-bw would you be so kind to re-run CI so that we can see the errors? The old logs have been archived.

@bocharsky-bw

bocharsky-bw commented Dec 22, 2025

Copy link
Copy Markdown
Member

@melbings I reran the CI for you, I hope this helps! Though I see this PR now should be rebased due to some changes in master, and there are some conflicts that should be resolved too.

UPD: Yeah, probably the conflicts should be resolved first. If you want to follow up on this PR and push it forward - please, feel free to create a new PR based on these changes

@melbings

Copy link
Copy Markdown

@bocharsky-bw I'm afraid we're abandoning this pull request on our side. We will use Symfony's UriSigner component to deal with signed URLs instead. Nevertheless, thank you for your work and your support.

@ToshY

ToshY commented Jul 1, 2026

Copy link
Copy Markdown

@bocharsky-bw @jrushlow Any chance this can still be merged?

@melbings

melbings commented Jul 2, 2026

Copy link
Copy Markdown

@bocharsky-bw @jrushlow Any chance this can still be merged?

I'm afraid that someone would need to resolve merge issues that have come up since we originally worked on this. Unfortunately, my company cannot work on this anymore. I assume that Claude & co. should have quite an easy time finishing this up, though.

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.

6 participants