Skip to content

web/admin/stages/captcha: fix float values in score tresholds fix provider parsing - #22782

Merged
BeryJu merged 8 commits into
goauthentik:mainfrom
joshua-siw:22409-captcha-stage-creation
Jul 8, 2026
Merged

BeryJu merged 8 commits into
goauthentik:mainfrom
joshua-siw:22409-captcha-stage-creation

Conversation

@joshua-siw

Copy link
Copy Markdown
Contributor

Details

resolves: #22409
Added Property to ak-number-input to allow float values
made detectProviderFromInstance method more distinctive to correctly fill in the previously choosen captcha provider because it is not stored in the database


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 and clients have been updated (make gen)

If changes to the frontend have been made

  • The code has been formatted (make web)

If applicable

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

joshua-siw added 4 commits May 28, 2026 14:05
…rseFloat conditionally on the property if set to true
…rovider because it is not stored in db, additional to jsUrl and apiUrl compare if preset and stage is interactive and compare if stage has a score set for min and max scoretreshold and compare with if preset supportsScore

resolves: goauthentik#22409
fix removed allowFloat from returned html, correctly use property in CaptchaStageForm
@joshua-siw
joshua-siw requested a review from a team as a code owner June 1, 2026 11:19
@netlify

netlify Bot commented Jun 1, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for authentik-storybook ready!

Name Link
🔨 Latest commit 8bb8261
🔍 Latest deploy log https://app.netlify.com/projects/authentik-storybook/deploys/6a4e5e653aca21000840faf2
😎 Deploy Preview https://deploy-preview-22782--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 project configuration.

@netlify

netlify Bot commented Jun 1, 2026

Copy link
Copy Markdown

✅ Deploy Preview for authentik-integrations ready!

Name Link
🔨 Latest commit a65ea85
🔍 Latest deploy log https://app.netlify.com/projects/authentik-integrations/deploys/6a1d6ac90106da00087bd998
😎 Deploy Preview https://deploy-preview-22782--authentik-integrations.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 project configuration.

@netlify

netlify Bot commented Jun 1, 2026

Copy link
Copy Markdown

✅ Deploy Preview for authentik-docs ready!

Name Link
🔨 Latest commit a65ea85
🔍 Latest deploy log https://app.netlify.com/projects/authentik-docs/deploys/6a1d6ac94f464c0008a3e2da
😎 Deploy Preview https://deploy-preview-22782--authentik-docs.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 project configuration.

@GirlBossRush
GirlBossRush self-requested a review June 8, 2026 15:40
@GirlBossRush GirlBossRush self-assigned this Jun 8, 2026
@BeryJu BeryJu added this to the Release 2026.8.0: Required milestone Jun 16, 2026
@codecov

codecov Bot commented Jul 8, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.19%. Comparing base (dd721cb) to head (8bb8261).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #22782      +/-   ##
==========================================
+ Coverage   93.14%   93.19%   +0.05%     
==========================================
  Files        1043     1043              
  Lines       60981    60981              
  Branches      424      424              
==========================================
+ Hits        56801    56832      +31     
+ Misses       4180     4149      -31     
Flag Coverage Δ
conformance 36.32% <ø> (+0.14%) ⬆️
e2e 41.52% <ø> (+0.23%) ⬆️
integration 32.24% <ø> (-0.50%) ⬇️
rust 0.00% <ø> (ø)
unit 92.31% <ø> (+<0.01%) ⬆️
unit-migrate 92.34% <ø> (ø)

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

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

@kensternberg-authentik kensternberg-authentik left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Not broken. I even checked; parseFloat("-1.0") === parseInt("-1", 10), which is both surprising and delightful.

The number of comparisons in shared.ts bothers me; that's a lot of configuration that has to match for confirmation, which is a code smell meaning that there's a missing name or missing matcher for these two objects.

But it's not broken.

@rissson rissson changed the title captcha/stage: fix float values in score tresholds fix provider parsing web/admin/stages/captcha: fix float values in score tresholds fix provider parsing Jul 8, 2026
@BeryJu
BeryJu merged commit 8d7c412 into goauthentik:main Jul 8, 2026
106 checks passed
@joshua-siw

joshua-siw commented Jul 8, 2026 •

Copy link
Copy Markdown
Contributor Author

The number of comparisons in shared.ts bothers me; that's a lot of configuration that has to match for confirmation, which is a code smell meaning that there's a missing name or missing matcher for these two objects.

Yes I don't like it as well, I guess an approach would be to store the provider within the database, so the whole function detectProviderFromInstance could be removed (also getCapWidgetUrl), but I didn't wanted to make changes to the scheme, because I didn't knew if the decision to not include the provider in it is intentional.

kensternberg-authentik added a commit that referenced this pull request Jul 9, 2026
* main: (34 commits)
  lifecycle/container: increase start time to 120s (#23896)
  ci: fix fork checks (#23894)
  root: fix docker compose pg volume path for compatibility with pg18 (#23883)
  ci: better image building (#23359)
  core: bump library/postgres from 16 to 18 in /scripts (#23812)
  core: Form friendly error on uniqueness constraint. (#23864)
  packages: migrate shared pins to the pnpm catalog: protocol (#23784)
  core, web: update translations (#23863)
  core: bump github.com/coreos/go-oidc/v3 from 3.19.0 to 3.20.0 (#23867)
  core: bump github.com/pires/go-proxyproto from 0.13.0 to 0.14.0 (#23868)
  core: bump golang.org/x/sync from 0.21.0 to 0.22.0 (#23866)
  core: bump library/node from `a1d9d67` to `ffc7838` in /lifecycle/container (#23871)
  core: bump axllent/mailpit from v1.30.3 to v1.30.4 in /tests/e2e (#23869)
  core: bump goauthentik/fips-python from `0d4cd1a` to `80d28af` in /lifecycle/container (#23872)
  core: bump library/golang from `756f3b7` to `ee5a795` in /lifecycle/container (#23873)
  core: bump library/node from 26.4.0-trixie to 26.5.0-trixie in /website (#23874)
  web: fix table refresh button not refreshing table data (#23780)
  endpoints: handle exception in connector controller sync setup (#23852)
  internal/outpost/ak: handle empty outpost list during refresh (#23827)
  web/admin/stages/captcha: fix float values in score tresholds fix provider parsing (#22782)
  ...
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.

Captcha stage creation

4 participants