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 ampersand encoding in tokens - backport to 4.4 #11676

Merged
merged 1 commit into from
Nov 11, 2022
Merged

Fix ampersand encoding in tokens - backport to 4.4 #11676

merged 1 commit into from
Nov 11, 2022

Conversation

JaZo
Copy link
Contributor

@JaZo JaZo commented Nov 4, 2022

Q A
Bug fix? (use the a.b branch) [x]
New feature/enhancement? (use the a.x branch) [ ]
Deprecations? [ ]
BC breaks? (use the c.x branch) [ ]
Automated tests included? [x]
Related user documentation PR URL N/A
Related developer documentation PR URL N/A
Issue(s) addressed Fixes #11643

Description:

Backport of #11644.

Steps to test this PR:

  1. Open this PR on Gitpod or pull down for testing locally (see docs on testing PRs here);
  2. Make sure you have a contact;
  3. Create a template email and use {url} as the URL of a link;
  4. Call the API endpoint: /api/emails/[ID OF EMAIL]/contact/[ID OF CONTACT]/send with body:
{
    "tokens": {
        "url": "https://localhost/test?foo=bar&email=john.doe%40example.com"
    }
}
  1. Click the link in the received email;
  2. See you're redirected to https://localhost/test?foo=bar&email=john.doe%40example.com instead of https://localhost/test?foo=bar&email=john.doe%40example.com.

@cla-bot cla-bot bot added the cla-signed The PR contributors have signed the contributors agreement label Nov 4, 2022
@codecov
Copy link

codecov bot commented Nov 4, 2022

Codecov Report

Merging #11676 (c0fe163) into 4.4 (7c88b6f) will increase coverage by 0.00%.
The diff coverage is 66.66%.

Impacted file tree graph

@@            Coverage Diff            @@
##                4.4   #11676   +/-   ##
=========================================
  Coverage     49.96%   49.97%           
  Complexity    35410    35410           
=========================================
  Files          2144     2144           
  Lines        106303   106301    -2     
=========================================
+ Hits          53117    53120    +3     
+ Misses        53186    53181    -5     
Impacted Files Coverage Δ
app/bundles/EmailBundle/Entity/Email.php 79.64% <0.00%> (+0.70%) ⬆️
app/bundles/PageBundle/Model/RedirectModel.php 21.05% <0.00%> (+0.36%) ⬆️
app/bundles/PageBundle/Model/TrackableModel.php 56.19% <50.00%> (+0.35%) ⬆️
app/bundles/CoreBundle/Helper/UrlHelper.php 65.00% <100.00%> (+1.20%) ⬆️
...bundles/PageBundle/Controller/PublicController.php 46.33% <100.00%> (ø)
...bundles/LeadBundle/Controller/ImportController.php 59.55% <0.00%> (-0.32%) ⬇️

@escopecz
Copy link
Sponsor Member

Please check the failing STAN issues.

@escopecz escopecz added bug Issues or PR's relating to bugs pending-feedback PR's and issues that are awaiting feedback from the author labels Nov 10, 2022
Co-authored-by: John Linhart <admin@escope.cz>
@JaZo
Copy link
Contributor Author

JaZo commented Nov 11, 2022

Please check the failing STAN issues.

Done!

@escopecz escopecz added ready-to-test PR's that are ready to test and removed pending-feedback PR's and issues that are awaiting feedback from the author labels Nov 11, 2022
Copy link
Sponsor Member

@escopecz escopecz left a comment

Choose a reason for hiding this comment

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

Thanks! The code looks good 👍

@escopecz escopecz added pending-test-confirmation PR's that require one test before they can be merged and removed ready-to-test PR's that are ready to test labels Nov 11, 2022
@escopecz escopecz mentioned this pull request Nov 11, 2022
25 tasks
Copy link
Contributor

@volha-pivavarchyk volha-pivavarchyk left a comment

Choose a reason for hiding this comment

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

Works well

image

@escopecz escopecz added this to the 4.4.5 milestone Nov 11, 2022
@escopecz escopecz merged commit 59ac664 into mautic:4.4 Nov 11, 2022
@escopecz escopecz mentioned this pull request Nov 18, 2022
22 tasks
@RCheesley RCheesley changed the title Backport #11644 to 4.4 Fix ampersand encoding in tokens - backport to 4.4 Nov 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues or PR's relating to bugs cla-signed The PR contributors have signed the contributors agreement pending-test-confirmation PR's that require one test before they can be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants