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

stages/email: fix duplicate querystring encoding #7386

Merged
merged 1 commit into from
Oct 30, 2023

Conversation

BeryJu
Copy link
Member

@BeryJu BeryJu commented Oct 30, 2023

Details

the email stage is only run through the flow executor meaning it should only check the querystring within query=, modify that and encode it as normal querystring for the final URL, as that doesn't hit the API directly

closes #7377


Checklist

  • Local tests pass (ak test authentik/)
  • The code has been formatted (make lint-fix)

If an API change has been made

  • The API schema has been updated (make gen-build)

If changes to the frontend have been made

  • The code has been formatted (make web)
  • The translation files have been updated (make i18n-extract)

If applicable

  • The documentation has been updated
  • The documentation has been formatted (make website)

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
@BeryJu BeryJu requested a review from a team as a code owner October 30, 2023 22:43
@netlify
Copy link

netlify bot commented Oct 30, 2023

Deploy Preview for authentik-storybook canceled.

Name Link
🔨 Latest commit d8f3a06
🔍 Latest deploy log https://app.netlify.com/sites/authentik-storybook/deploys/6540319a31dc630008768c60

@codecov
Copy link

codecov bot commented Oct 30, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (6df83e4) 91.20% compared to head (d8f3a06) 92.57%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7386      +/-   ##
==========================================
+ Coverage   91.20%   92.57%   +1.37%     
==========================================
  Files         587      587              
  Lines       28911    28895      -16     
==========================================
+ Hits        26367    26750     +383     
+ Misses       2544     2145     -399     
Flag Coverage Δ
e2e 50.88% <66.66%> (+7.02%) ⬆️
integration 26.01% <0.00%> (+0.01%) ⬆️
unit 89.59% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
authentik/stages/email/stage.py 95.69% <100.00%> (-0.14%) ⬇️
authentik/stages/email/tests/test_stage.py 100.00% <100.00%> (ø)

... and 47 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@github-actions
Copy link
Contributor

authentik PR Installation instructions

Instructions for docker-compose

Add the following block to your .env file:

AUTHENTIK_IMAGE=ghcr.io/goauthentik/dev-server
AUTHENTIK_TAG=gh-stages-email-fix-duplicate-query-string-encoding-1698706779-d8f3a06
AUTHENTIK_OUTPOSTS__CONTAINER_IMAGE_BASE=ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)s

For arm64, use these values:

AUTHENTIK_IMAGE=ghcr.io/goauthentik/dev-server
AUTHENTIK_TAG=gh-stages-email-fix-duplicate-query-string-encoding-1698706779-d8f3a06-arm64
AUTHENTIK_OUTPOSTS__CONTAINER_IMAGE_BASE=ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)s

Afterwards, run the upgrade commands from the latest release notes.

Instructions for Kubernetes

Add the following block to your values.yml file:

authentik:
    outposts:
        container_image_base: ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)s
image:
    repository: ghcr.io/goauthentik/dev-server
    tag: gh-stages-email-fix-duplicate-query-string-encoding-1698706779-d8f3a06

For arm64, use these values:

authentik:
    outposts:
        container_image_base: ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)s
image:
    repository: ghcr.io/goauthentik/dev-server
    tag: gh-stages-email-fix-duplicate-query-string-encoding-1698706779-d8f3a06-arm64

Afterwards, run the upgrade commands from the latest release notes.

@BeryJu BeryJu merged commit 028c7af into main Oct 30, 2023
63 of 64 checks passed
@BeryJu BeryJu deleted the stages/email/fix-duplicate-query-string-encoding branch October 30, 2023 23:27
kensternberg-authentik added a commit that referenced this pull request Nov 1, 2023
* main:
  website/integrations: argocd: add missing url in ArgoCD configuration (#7404)
  core: bump sentry-sdk from 1.32.0 to 1.33.1 (#7397)
  core: bump webauthn from 1.11.0 to 1.11.1 (#7399)
  core: bump github.com/redis/go-redis/v9 from 9.2.1 to 9.3.0 (#7396)
  core: bump twisted from 23.8.0 to 23.10.0 (#7398)
  web: bump the sentry group in /web with 2 updates (#7401)
  web: bump pyright from 1.1.333 to 1.1.334 in /web (#7402)
  web: bump rollup from 4.1.5 to 4.2.0 in /web (#7403)
  core: bump pytest-django from 4.5.2 to 4.6.0 (#7387)
  web: bump the eslint group in /tests/wdio with 2 updates (#7388)
  web: bump the sentry group in /web with 2 updates (#7366)
  web: bump the eslint group in /web with 2 updates (#7389)
  web: bump core-js from 3.33.1 to 3.33.2 in /web (#7390)
  stages/email: fix duplicate querystring encoding (#7386)
  web/admin: fix html error on oauth2 provider page (#7384)
@BeryJu
Copy link
Member Author

BeryJu commented Nov 3, 2023

/cherry-pick version-2023.10

gcp-cherry-pick-bot bot pushed a commit that referenced this pull request Nov 3, 2023
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
BeryJu added a commit that referenced this pull request Nov 3, 2023
…7425)

stages/email: fix duplicate querystring encoding (#7386)

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
Co-authored-by: Jens L <jens@goauthentik.io>
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.

Email stage links incorrectly encoded
1 participant