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

web/admin: fix html error on oauth2 provider page #7384

Merged

Conversation

kensternberg-authentik
Copy link
Contributor

@kensternberg-authentik kensternberg-authentik commented Oct 30, 2023

Details

Extra > symbol screwed up the reading of the rest of the component. Unfortunately, too many fields in an input are optional, so it was easy for this bug to bypass any checks by the validators. I should have caught it myself, though.

closes #7375

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)

This commit changes the way the root node of the web application shell is
discovered by child components, such that the base class shared by both
no longer results in a circular dependency between the two models.

I've run this in isolation and have seen no failures of discovery; the identity
token exists as soon as the Interface is constructed and is found by every item
on the page.
* main: (57 commits)
  stages/email: Fix query parameters getting lost in Email links (#5376)
  core/rbac: fix missing field when removing perm, add delete from object page (#7226)
  website/integrations: grafana: add Helm and Terraform config examples (#7121)
  web: bump @types/codemirror from 5.60.11 to 5.60.12 in /web (#7223)
  translate: Updates for file web/xliff/en.xlf in zh_CN (#7224)
  translate: Updates for file web/xliff/en.xlf in zh-Hans (#7225)
  website/blogs: blog about sso tax (#7202)
  web: Application wizard v2 with tests (#7004)
  web: bump API Client version (#7220)
  core: bump goauthentik.io/api/v3 from 3.2023083.7 to 3.2023083.8 (#7221)
  providers/radius: TOTP MFA support (#7217)
  web: bump API Client version (#7218)
  stage/deny: add custom message (#7144)
  docs: update full-dev-setup docs (#7205)
  enterprise: bump license usage task frequency (#7215)
  web: bump the storybook group in /web with 5 updates (#7212)
  web: bump the sentry group in /web with 2 updates (#7211)
  Revert "web: Updates to the Context and Tasks libraries from lit. (#7168)"
  web: bump @types/codemirror from 5.60.10 to 5.60.11 in /web (#7209)
  web: bump @types/chart.js from 2.9.38 to 2.9.39 in /web (#7206)
  ...
* main:
  web/flows: update flow background (#7232)
  web/admin: fix prompt form and codemirror mode (#7231)
  web/admin: decrease wizard hint padding (#7227)
* main:
  web: bump API Client version (#7246)
  sources/oauth: include default JWKS URLs for OAuth sources (#6992)
  sources/oauth: periodically update OAuth sources' OIDC configuration (#7245)
  website/blogs: Fix sso blog to remove 3rd reason (#7230)
  lifecycle: fix otp_merge migration again (#7244)
  web: bump core-js from 3.33.0 to 3.33.1 in /web (#7243)
  core: bump node from 20 to 21 (#7237)
  web: fix bad comment that was confusing lit-analyze (#7234)
  translate: Updates for file web/xliff/en.xlf in zh_CN (#7235)
  core: bump ruff from 0.1.0 to 0.1.1 (#7238)
  core: bump twilio from 8.9.1 to 8.10.0 (#7239)
  web: bump the storybook group in /web with 5 updates (#7240)
  web: bump the wdio group in /tests/wdio with 4 updates (#7241)
  translate: Updates for file web/xliff/en.xlf in zh-Hans (#7236)
  web: isolate clipboard handling (#7229)
This built... and then it didn't?  Anyway, the current fix is to
provide type information the AkInterface for the data that consumers
require.
* main:
  sources/oauth: fix oidc well-known parsing (#7248)
  web/admin: improve user email button labels (#7233)
* main:
  core: bump pylint-django from 2.5.3 to 2.5.4 (#7255)
  core: bump goauthentik.io/api/v3 from 3.2023083.9 to 3.2023083.10 (#7256)
  web: bump the wdio group in /tests/wdio with 1 update (#7258)
  web: bump the eslint group in /tests/wdio with 1 update (#7257)
  sources/oauth: fix name clash (#7253)
  web: bump the eslint group in /web with 1 update (#7250)
  web: bump mermaid from 10.5.0 to 10.5.1 in /web (#7247)
  web: break circular dependency between AKElement & Interface. (#7165)
* main: (28 commits)
  web: fix typo in traefik name
  web/admin: disable wizard banner for now (#7294)
  web/admin: small fixes (#7292)
  core: Use branding_title in the end session page (#7282)
  web: bump pyright from 1.1.332 to 1.1.333 in /web (#7287)
  website: bump react-tooltip from 5.21.5 to 5.21.6 in /website (#7283)
  web: bump the sentry group in /web with 2 updates (#7285)
  web: bump the eslint group in /web with 1 update (#7286)
  core: bump ruff from 0.1.1 to 0.1.2 (#7289)
  core: bump pytest from 7.4.2 to 7.4.3 (#7288)
  web: bump the wdio group in /tests/wdio with 3 updates (#7290)
  website/blogs: fixed typo in blog (#7281)
  core: bump pylint from 2.17.7 to 3.0.2 (#7270)
  web: bump the eslint group in /tests/wdio with 2 updates (#7274)
  translate: Updates for file web/xliff/en.xlf in zh-Hans (#7278)
  translate: Updates for file web/xliff/en.xlf in zh_CN (#7277)
  ci: bump actions/setup-node from 3 to 4 (#7268)
  core: bump pylint-django from 2.5.4 to 2.5.5 (#7271)
  web: bump the eslint group in /web with 2 updates (#7269)
  web: bump @trivago/prettier-plugin-sort-imports from 4.2.0 to 4.2.1 in /tests/wdio (#7275)
  ...
* main: (38 commits)
  crypto: fix race conditions when creating self-signed certificates on startup (#7344)
  blueprints: fix entries with state: absent not being deleted if their serializer has errors (#7345)
  web/admin: fix @change handler for ak-radio elements (#7348)
  rbac: handle lookup error (#7341)
  website/docs: add warning about upgrading to 2023.10 (#7340)
  web/admin: fix role form reacting to enter (#7330)
  core: bump github.com/google/uuid from 1.3.1 to 1.4.0 (#7333)
  core: bump goauthentik.io/api/v3 from 3.2023083.10 to 3.2023101.1 (#7334)
  core: bump ruff from 0.1.2 to 0.1.3 (#7335)
  core: bump pydantic-scim from 0.0.7 to 0.0.8 (#7336)
  website/blogs: Blog dockers (#7328)
  providers/proxy: attempt to fix duplicate cookie (#7324)
  stages/email: fix sending emails from task (#7325)
  web: bump API Client version (#7321)
  website/docs: update release notes for 2023.10.1 (#7316)
  release: 2023.10.1
  lifecycle: fix otp merge migration (#7315)
  root: fix pylint errors (#7312)
  web: bump API Client version (#7311)
  release: 2023.10.0
  ...
* main:
  web: bump rollup from 4.1.4 to 4.1.5 in /web (#7370)
  website/integrations: add SonarQube (#7167)
  web: bump the storybook group in /web with 5 updates (#7382)
  core: bump goauthentik.io/api/v3 from 3.2023101.1 to 3.2023102.1 (#7378)
  web: bump ts-lit-plugin from 2.0.0 to 2.0.1 in /web (#7379)
  web: bump @rollup/plugin-replace from 5.0.4 to 5.0.5 in /web (#7380)
  web: bump API Client version (#7365)
  website/docs: add 2023.8.4 release notes
  release: 2023.10.2
  security: fix oobe-flow reuse when akadmin is deleted (#7361)
  website/docs: prepare 2023.10.2 release notes (#7362)
  website/docs: add missing breaking change due to APPEND_SLASH (#7360)
  lifecycle: rework otp_merge migration (#7359)
  translate: Updates for file web/xliff/en.xlf in zh-Hans (#7354)
  translate: Updates for file web/xliff/en.xlf in zh_CN (#7353)
  website/docs: add warning about Helm breaking change in 2024.x (#7351)
Extra `>` symbol screwed up the reading of the rest of the component.  Unfortunately,
too many fields in an input are optional, so it was easy for this bug to bypass any
checks by the validators.  I should have caught it myself, though.
@netlify
Copy link

netlify bot commented Oct 30, 2023

Deploy Preview for authentik-storybook ready!

Name Link
🔨 Latest commit ecc8529
🔍 Latest deploy log https://app.netlify.com/sites/authentik-storybook/deploys/65400ee79ee9e700087a161d
😎 Deploy Preview https://deploy-preview-7384--authentik-storybook.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@@ -334,13 +334,14 @@ export class OAuth2ProviderFormPage extends ModelForm<OAuth2Provider, number> {
)}
>
</ak-radio-input>
<ak-switch-input name="includeClaimsInIdToken">
Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's that extra > at the end of this line that screwed everything up. It isn't so much "malformed HTML" as "insufficiently specified HTML."

@codecov
Copy link

codecov bot commented Oct 30, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (afdca41) 89.60% compared to head (ecc8529) 92.47%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7384      +/-   ##
==========================================
+ Coverage   89.60%   92.47%   +2.87%     
==========================================
  Files         587      587              
  Lines       28911    28911              
==========================================
+ Hits        25905    26736     +831     
+ Misses       3006     2175     -831     
Flag Coverage Δ
e2e 50.21% <ø> (?)
integration 26.00% <ø> (?)
unit 89.60% <ø> (ø)

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

see 69 files with indirect coverage changes

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

@BeryJu BeryJu changed the title Web/bug/7375 html error on oauth2 provider page web/admin: fix html error on oauth2 provider page Oct 30, 2023
@kensternberg-authentik kensternberg-authentik marked this pull request as ready for review October 30, 2023 22:35
@kensternberg-authentik kensternberg-authentik requested a review from a team as a code owner October 30, 2023 22:35
@kensternberg-authentik kensternberg-authentik merged commit 6df83e4 into main Oct 30, 2023
@kensternberg-authentik kensternberg-authentik deleted the web/bug/7375-html-error-on-oauth2-provider-page branch October 30, 2023 22:35
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

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
* web: break circular dependency between AKElement & Interface.

This commit changes the way the root node of the web application shell is
discovered by child components, such that the base class shared by both
no longer results in a circular dependency between the two models.

I've run this in isolation and have seen no failures of discovery; the identity
token exists as soon as the Interface is constructed and is found by every item
on the page.

* web: fix broken typescript references

This built... and then it didn't?  Anyway, the current fix is to
provide type information the AkInterface for the data that consumers
require.

* \# Details

Extra `>` symbol screwed up the reading of the rest of the component.  Unfortunately,
too many fields in an input are optional, so it was easy for this bug to bypass any
checks by the validators.  I should have caught it myself, though.
BeryJu pushed a commit that referenced this pull request Nov 3, 2023
…#7424)

web/admin: fix html error on oauth2 provider page (#7384)

* web: break circular dependency between AKElement & Interface.

This commit changes the way the root node of the web application shell is
discovered by child components, such that the base class shared by both
no longer results in a circular dependency between the two models.

I've run this in isolation and have seen no failures of discovery; the identity
token exists as soon as the Interface is constructed and is found by every item
on the page.

* web: fix broken typescript references

This built... and then it didn't?  Anyway, the current fix is to
provide type information the AkInterface for the data that consumers
require.

* \# Details

Extra `>` symbol screwed up the reading of the rest of the component.  Unfortunately,
too many fields in an input are optional, so it was easy for this bug to bypass any
checks by the validators.  I should have caught it myself, though.

Co-authored-by: Ken Sternberg <133134217+kensternberg-authentik@users.noreply.github.com>
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.

Create or edit Oauth2 provider page - unable to tick "include claims in ID token" due to malformed HTML?
2 participants