-
Notifications
You must be signed in to change notification settings - Fork 26
U2F "Adding device" hang #900
Comments
See #690 |
In my case (unsure whether exactly related), this happened when I tried to add the same U2F device several times. In infinitely hanged without an error message. |
I'm seeing the same issue, endless spinning and the error:
And I already have
|
We can see twofactor_u2f/src/components/AddDeviceDialog.vue Lines 178 to 191 in 5fe47c0
Which created a data object with the name attribute set to what the user provides, which then is sent via:twofactor_u2f/src/services/RegistrationService.js Lines 32 to 37 in 7edb7f7
To the /apps/twofactor_u2f/settings/finishregister endpoint. Which we can see happened above, as expected.
So the issue probably isn't on the frontend, meaning Vue/JS side. |
This is the full error btw: https://gist.github.com/jakubgs/951909e3253baf46cc54e5a9521b255d |
These three issues seem related:
They all include the |
I can't add a new WebAuthn device. Is this related or should i open a new issue? Browser Log (Firefox):
|
I've added dome debugging prints to the code to check the values, and when the payload for The
Where public function finishRegister(string $registrationData, string $clientData, string $name = null): JSONResponse {
return new JSONResponse($this->manager->finishRegistration($this->userSession->getUser(), $registrationData, $clientData, $name));
} So we're clearly missing |
When I put a debug line here: $this->logger->info("WTF param: $param -> '$value' ($type)"); I can see that the arguments are all of type
But then the first two empty strings somehow get turned into |
Specifically, I printed contents of And it appears that the empty string in
Which as far as I can tell should not be happening: But I lack the context to know if these should even be empty strings in the first place. |
@ChristophWurst sorry for pinging you directly but I'd appreciate some insight here. What are the expected values for Are those variables supposed to be present in the JSON that is |
Based on these lines it appears that the twofactor_u2f/src/components/AddDeviceDialog.vue Lines 178 to 180 in 5fe47c0
Correct? So that would mean the issue is somewhere in the frontend JS? |
It appears to me that if something went wrong on client side we should see this error here: twofactor_u2f/src/components/AddDeviceDialog.vue Lines 110 to 116 in 5fe47c0
But instead what I get is:
Though I can see that there is a payload sent to the |
And the error appears to be handled by this case: twofactor_u2f/src/components/AddDeviceDialog.vue Lines 153 to 159 in 5fe47c0
The errorCode being the unknown fallback doesn't help debug this.
|
I think the key to this issue is this error:
Which is described here: But the thing is I already have 'overwrite.cli.url' => 'https://localhost',
'overwritehost' => 'cloud.example.org',
'overwriteprotocol' => 'https',
'trusted_domains' =>
array (
0 => 'localhost',
1 => 'cloud.example.org',
2 => 'onlyoffice.example.org',
),
'trusted_proxies' =>
array (
0 => '127.0.0.1',
1 => '10.0.0.0/8',
2 => '172.17.0.0/16',
), But something is still missing. Maybe my |
I'm starting to think the most sensible thing is to just disable U2F extension in favor of WebAuthN since U2F is deprecated. Because I really can't get this to work no matter how I change my reverse proxy setup. |
Steps to reproduce
Expected behaviour
Tell us what should happen
Actual behaviour
Tell us what happens instead
Server configuration
Operating system:
FreeBSD 12.2
Web server:
apache 24
Database:
mysql
PHP version:
8.0
Version: (see admin page)
21.0.2
Updated from an older version or fresh install:
fresh
List of activated apps:
Enabled:
Disabled:
The content of config/config.php:
{
"system": {
"instanceid": "REMOVED SENSITIVE VALUE",
"passwordsalt": "REMOVED SENSITIVE VALUE",
"secret": "REMOVED SENSITIVE VALUE",
"trusted_domains": [
"localhost",
"binary.biltmore",
"192.168.150.170",
"ashbury.helical.com"
],
"datadirectory": "REMOVED SENSITIVE VALUE",
"dbtype": "mysql",
"version": "21.0.2.1",
"overwrite.cli.url": "http://localhost",
"dbname": "REMOVED SENSITIVE VALUE",
"dbhost": "REMOVED SENSITIVE VALUE",
"dbport": "",
"dbtableprefix": "oc_",
"mysql.utf8mb4": true,
"dbuser": "REMOVED SENSITIVE VALUE",
"dbpassword": "REMOVED SENSITIVE VALUE",
"installed": true,
"overwriteprotocol": "https",
"simpleSignUpLink.shown": false,
"mail_from_address": "REMOVED SENSITIVE VALUE",
"mail_smtpmode": "sendmail",
"mail_sendmailmode": "smtp",
"mail_domain": "REMOVED SENSITIVE VALUE",
"mail_smtpauthtype": "LOGIN",
"mail_smtphost": "REMOVED SENSITIVE VALUE",
"mail_smtpauth": 1,
"mail_smtpname": "REMOVED SENSITIVE VALUE",
"mail_smtppassword": "REMOVED SENSITIVE VALUE",
"mail_smtpsecure": "ssl",
"mail_smtpport": "587",
"twofactor_enforced": "false",
"twofactor_enforced_groups": [],
"twofactor_enforced_excluded_groups": []
},
"apps": {
"accessibility": {
"enabled": "yes",
"installed_version": "1.7.0",
"types": ""
},
"activity": {
"enabled": "yes",
"installed_version": "2.14.3",
"types": "filesystem"
},
"backgroundjob": {
"lastjob": "154"
},
"bruteforcesettings": {
"enabled": "yes",
"installed_version": "2.1.0",
"types": ""
},
"cloud_federation_api": {
"enabled": "yes",
"installed_version": "1.4.0",
"types": "filesystem"
},
"comments": {
"enabled": "yes",
"installed_version": "1.11.0",
"types": "logging"
},
"contactsinteraction": {
"enabled": "yes",
"installed_version": "1.2.0",
"types": "dav"
},
"core": {
"installed.bundles": "["CoreBundle"]",
"installedat": "1623070318.2491",
"lastcron": "1623537832",
"lastupdateResult": "[]",
"lastupdatedat": "1623537681",
"public_files": "files_sharing/public.php",
"public_webdav": "dav/appinfo/v1/publicwebdav.php",
"theming.variables": "32ef7dc01a3ffbcbbaf8fb9483f9bd03",
"vendor": "nextcloud"
},
"dashboard": {
"enabled": "yes",
"installed_version": "7.1.0",
"types": ""
},
"dav": {
"enabled": "yes",
"installed_version": "1.17.1",
"types": "filesystem"
},
"federatedfilesharing": {
"enabled": "yes",
"installed_version": "1.11.0",
"types": ""
},
"federation": {
"enabled": "yes",
"installed_version": "1.11.0",
"types": "authentication"
},
"files": {
"enabled": "yes",
"installed_version": "1.16.0",
"types": "filesystem"
},
"files_pdfviewer": {
"enabled": "yes",
"installed_version": "2.1.0",
"types": ""
},
"files_rightclick": {
"enabled": "yes",
"installed_version": "1.0.0",
"types": ""
},
"files_sharing": {
"enabled": "yes",
"installed_version": "1.13.1",
"types": "filesystem"
},
"files_trashbin": {
"enabled": "yes",
"installed_version": "1.11.0",
"types": "filesystem,dav"
},
"files_versions": {
"enabled": "yes",
"installed_version": "1.14.0",
"types": "filesystem,dav"
},
"files_videoplayer": {
"enabled": "yes",
"installed_version": "1.10.0",
"types": ""
},
"firstrunwizard": {
"enabled": "yes",
"installed_version": "2.10.0",
"types": "logging"
},
"logreader": {
"enabled": "yes",
"installed_version": "2.6.0",
"types": ""
},
"lookup_server_connector": {
"enabled": "yes",
"installed_version": "1.9.0",
"types": "authentication"
},
"nextcloud_announcements": {
"enabled": "yes",
"installed_version": "1.10.0",
"pub_date": "Thu, 24 Oct 2019 00:00:00 +0200",
"types": "logging"
},
"notifications": {
"enabled": "yes",
"installed_version": "2.9.0",
"types": "logging"
},
"oauth2": {
"enabled": "yes",
"installed_version": "1.9.0",
"types": "authentication"
},
"password_policy": {
"enabled": "yes",
"installed_version": "1.11.0",
"types": "authentication"
},
"photos": {
"enabled": "yes",
"installed_version": "1.3.0",
"types": ""
},
"privacy": {
"enabled": "yes",
"installed_version": "1.5.0",
"readableLocation": "us",
"types": ""
},
"provisioning_api": {
"enabled": "yes",
"installed_version": "1.11.0",
"types": "prevent_group_restriction"
},
"recommendations": {
"enabled": "yes",
"installed_version": "1.0.0",
"types": ""
},
"serverinfo": {
"cached_count_filecache": "76211",
"cached_count_storages": "3",
"enabled": "yes",
"installed_version": "1.11.0",
"types": ""
},
"settings": {
"enabled": "yes",
"installed_version": "1.3.0",
"types": ""
},
"sharebymail": {
"enabled": "yes",
"installed_version": "1.11.0",
"types": "filesystem"
},
"support": {
"enabled": "yes",
"installed_version": "1.4.0",
"types": "session"
},
"survey_client": {
"enabled": "yes",
"installed_version": "1.9.0",
"types": ""
},
"systemtags": {
"enabled": "yes",
"installed_version": "1.11.0",
"types": "logging"
},
"text": {
"enabled": "yes",
"installed_version": "3.2.0",
"types": "dav"
},
"theming": {
"enabled": "yes",
"installed_version": "1.12.0",
"types": "logging"
},
"twofactor_backupcodes": {
"enabled": "yes",
"installed_version": "1.10.0",
"types": ""
},
"twofactor_u2f": {
"enabled": "yes",
"installed_version": "6.1.0",
"types": ""
},
"twofactor_webauthn": {
"enabled": "no",
"installed_version": "0.2.10",
"types": ""
},
"updatenotification": {
"enabled": "yes",
"installed_version": "1.11.0",
"types": "",
"update_check_errors": "0"
},
"user_status": {
"enabled": "yes",
"installed_version": "1.1.1",
"types": ""
},
"viewer": {
"enabled": "yes",
"installed_version": "1.5.0",
"types": ""
},
"weather_status": {
"enabled": "yes",
"installed_version": "1.1.0",
"types": ""
},
"workflowengine": {
"enabled": "yes",
"installed_version": "2.3.0",
"types": "filesystem"
}
}
}
Client configuration
Browser:
Safari
Operating system:
Mac OS X 11.4
Logs
Web server error log
Server log (data/nextcloud.log)
{"reqId":"PEjCnGCv7lS7XvRlu1Sf","level":3,"time":"2021-06-12T22:51:00+00:00","remoteAddr":"192.168.150.10","user":"robb","app":"index","method":"POST","url":"/nextcloud/index.php/apps/twofactor_u2f/settings/finishregister","message":{"Exception":"Exception","Message":"OCA\TwoFactorU2F\Controller\SettingsController::finishRegister(): Argument #1 ($registrationData) must be of type string, null given, called in /usr/local/www/apache24/data/nextcloud/lib/private/AppFramework/Http/Dispatcher.php on line 218","Code":0,"Trace":[{"file":"/usr/local/www/apache24/data/nextcloud/lib/private/AppFramework/App.php","line":157,"function":"dispatch","class":"OC\AppFramework\Http\Dispatcher","type":"->"},{"file":"/usr/local/www/apache24/data/nextcloud/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\AppFramework\App","type":"::"},{"file":"/usr/local/www/apache24/data/nextcloud/lib/base.php","line":993,"function":"match","class":"OC\Route\Router","type":"->"},{"file":"/usr/local/www/apache24/data/nextcloud/index.php","line":37,"function":"handleRequest","class":"OC","type":"::"}],"File":"/usr/local/www/apache24/data/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","Line":159,"Previous":{"Exception":"TypeError","Message":"OCA\TwoFactorU2F\Controller\SettingsController::finishRegister(): Argument #1 ($registrationData) must be of type string, null given, called in /usr/local/www/apache24/data/nextcloud/lib/private/AppFramework/Http/Dispatcher.php on line 218","Code":0,"Trace":[{"file":"/usr/local/www/apache24/data/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":218,"function":"finishRegister","class":"OCA\TwoFactorU2F\Controller\SettingsController","type":"->"},{"file":"/usr/local/www/apache24/data/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":127,"function":"executeController","class":"OC\AppFramework\Http\Dispatcher","type":"->"},{"file":"/usr/local/www/apache24/data/nextcloud/lib/private/AppFramework/App.php","line":157,"function":"dispatch","class":"OC\AppFramework\Http\Dispatcher","type":"->"},{"file":"/usr/local/www/apache24/data/nextcloud/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\AppFramework\App","type":"::"},{"file":"/usr/local/www/apache24/data/nextcloud/lib/base.php","line":993,"function":"match","class":"OC\Route\Router","type":"->"},{"file":"/usr/local/www/apache24/data/nextcloud/index.php","line":37,"function":"handleRequest","class":"OC","type":"::"}],"File":"/usr/local/www/apache24/data/nextcloud/apps/twofactor_u2f/lib/Controller/SettingsController.php","Line":65},"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.1 Safari/605.1.15","version":"21.0.2.1"}
Browser log
Here's the Nextcloud log entry:
"Exception: OCA\TwoFactorU2F\Controller\SettingsController::finishRegister(): Argument #1 ($registrationData) must be of type string, null given"
The text was updated successfully, but these errors were encountered: