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

[K4] 1Password in Safari triggers undefined is not an object (evaluating 'i.form') error on TOTP form #6319

Open
scottboms opened this issue Mar 1, 2024 · 9 comments
Labels
needs: replication 🔬 Requires a sample to reproduce the issue type: stale 💤 Will be closed soon because there was no recent activity

Comments

@scottboms
Copy link

Description

When signing into a panel account with 2fac and TOPT enabled, an error which reads undefined is not an object (evaluating 'i.form') appears obscuring the TOPT code field though the field appears to still be properly populated (in my case from 1Password) and doesn't prevent login. Disabling TOPT in the config seems to make this error go away. This just started happening after upgrading to version 4.1.1.

Expected behavior

No errors interrupting login :)

To reproduce

  1. From panel login screen, enter username and password and click Log in button.
  2. After redirecting to the TOPT screen, enter the TOPT code either from a password manager or code delivered via email.
  3. Error appears and dims Login code screen.

AUTH CONFIG:

'auth' => [
  'methods' => [
    'password' => ['2fa' => true],
    'challenges' => ['totp', 'email'],
  ],
],

Confirmed that this behavior still happens using a clean Starterkit. The error also appeared when enabling a TOPT code for the first time as well.

Your setup

Kirby 4.1.1 running on Apache 2.4.58 with PHP 8.3.3, local on macOS installed with Homebrew

Console output
Failed to load resource: the server responded with a status of 403 (Forbidden) http://localhost:8000/api/auth/code

Your system (please complete the following information)

  • Device: Apple MacBook Pro M3
  • OS: macOS 14.3.1
  • Browser: Safari 17.3.1

Additional context
Not seeing the error in Firefox 123.0 so maybe specific to Safari

@bastianallgeier
Copy link
Member

@lukasbestle could you have a look at this?

@lukasbestle
Copy link
Member

Tried to reproduce this with Kirby 4.1.1 in Safari on macOS, but unfortunately without success.

@scottboms The console output you get is interesting and could be relevant. If it happens again, could you please check what the full response of that API request looks like and post the body?

@lukasbestle lukasbestle added the needs: replication 🔬 Requires a sample to reproduce the issue label Mar 4, 2024
@scottboms
Copy link
Author

scottboms commented Mar 4, 2024

Screenshot 2024-03-04 at 3 34 07 PM

Strangely the only error I'm seeing in the browser console is something related to 1Password (presumably because it can't resolve the local domain). This happens every time I login locally but only started with 4.1.1. I hadn't seen any errors previously with any other 4.x release.

No errors showing up in my Apache error log fyi. If there's anything else I can do to try to help get to the bottom of this, let me know. I also tried removing all plugins, but the error persisted.

@lukasbestle
Copy link
Member

Could you please try to go back to Kirby 4.1.0 in the same browser setup to verify that it is indeed a regression in 4.1.1?

@scottboms
Copy link
Author

Just tried with 4.1.0 and seeing the same issue which got me thinking that this actually might be a different problem. And it seems I might be right. I tried turning off the 1Password extension and that seemed to actually do the trick and the error went away. So maybe something tied to how the extension identifies form fields.

Which is all to say this looks like it's a non-issue and I think you can close this out safely.

@lukasbestle
Copy link
Member

Thanks for testing. The error message occurs in Kirby, so we might still want to fix this.

I no longer use 1Password, so I cannot reproduce this unfortunately. @bastianallgeier Do you still use it and could test it in Safari?

@bastianallgeier
Copy link
Member

I'm afraid I'm using an older 1Password version without their required accounts and that does not work with the extension. I just tried.

@lukasbestle lukasbestle changed the title [K4] Panel error interrupts login with TOPT 2fac enabled [K4] 1Password in Safari triggers undefined is not an object (evaluating 'i.form') error on TOTP form Mar 5, 2024
@lukasbestle
Copy link
Member

I think we can keep this issue open for a while, maybe someone else can reproduce this.

Copy link
Contributor

github-actions bot commented May 5, 2024

This issue has been marked as stale because it requires further input but has not seen activity in the past months. This is for us to prioritize issues that are still relevant and actionable. It will be closed if no further activity occurs within the next 15 days. If this issue is still relevant to you, please help us in gathering the necessary input.

@github-actions github-actions bot added the type: stale 💤 Will be closed soon because there was no recent activity label May 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs: replication 🔬 Requires a sample to reproduce the issue type: stale 💤 Will be closed soon because there was no recent activity
Projects
None yet
Development

No branches or pull requests

3 participants