Commit 6cdbfa3
fix: pass topOriginValidator to CheckTopOrigin in requestCeremony() (#821)
* fix: pass topOriginValidator to CheckTopOrigin in requestCeremony()
The custom TopOriginValidator set via enableTopOriginValidator() was only
passed to CheckTopOrigin in creationCeremony() but not in
requestCeremony(), causing the fallback HostTopOriginValidator to always
be used during authentication. This broke cross-origin iframe scenarios
where topOrigin differs from the host.
Fixes #816
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: make enableTopOriginValidator actually enable the validation
Previously, CheckTopOrigin always validated the top origin using a
fallback HostTopOriginValidator when no custom validator was set. This
made enableTopOriginValidator() misleading since validation was always
active regardless.
Now, when no TopOriginValidator is configured, the top origin check is
skipped entirely. Calling enableTopOriginValidator() truly enables the
validation, matching the method's name and intent.
Fixes #816
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 8ee7654 commit 6cdbfa3
File tree
2 files changed
+3
-4
lines changed- src/webauthn/src/CeremonyStep
2 files changed
+3
-4
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
172 | | - | |
| 172 | + | |
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
37 | | - | |
38 | | - | |
| 36 | + | |
39 | 37 | | |
| 38 | + | |
40 | 39 | | |
41 | 40 | | |
0 commit comments