yrccondor / wp-webauthn

🔒 WP-WebAuthn allows you to safely login to your WordPress site without password.
https://wordpress.org/plugins/wp-webauthn
GNU General Public License v3.0
131 stars 15 forks source link

Disable the need for gmp extension #54

Open dfinnema opened 1 year ago

dfinnema commented 1 year ago

Was testing this out locally and after removing the checks for the 'gmp' extension it was still working. The test environment did have bcmath and mbstring installed.

Perhaps the plugin can be updated to work without the 'gmp' extension in specific circumstances, making it easier to deploy on environments that cannot install the extension.

Debug Log below: [2023-06-08 19:52:17][568e3c] Warning: PHP extension gmp not found [2023-06-08 19:52:17][568e3c] PHP Version => 8.0.22, WordPress Version => 6.2.2, WP-WebAuthn Version => 1.2.8 [2023-06-08 19:52:17][568e3c] Current config: first_choice => "true", website_name => "WebAuth", website_domain => "webauth.local", remember_me => "false", user_verification => "false", allow_authenticator_type => "none", usernameless_login => "false" [2023-06-08 19:52:17][568e3c] Logger initialized [2023-06-08 19:53:51][7530a9] ajax_ajax_authenticator_list: Empty authenticator list [2023-06-08 19:54:34][5a6837] ajax_ajax_authenticator_list: Empty authenticator list [2023-06-08 19:54:40][2c5977] ajax_create: Start [2023-06-08 19:54:40][2c5977] ajax_create: name => "test", type => "none", usernameless => "false" [2023-06-08 19:54:40][2c5977] ajax_create: user => "df" [2023-06-08 19:54:40][2c5977] ajax_create: User not initialized, initialize [2023-06-08 19:54:40][2c5977] ajax_create: excludeCredentials => [] [2023-06-08 19:54:40][2c5977] ajax_create: user_verification => "false" [2023-06-08 19:54:40][2c5977] ajax_create: Challenge sent [2023-06-08 19:54:50][cd6714] ajax_create_response: Client response received [2023-06-08 19:54:50][cd6714] ajax_create_response: name => "test", type => "none", usernameless => "false" [2023-06-08 19:54:50][cd6714] ajax_create_response: data => {"id":"2hc4gwTGlz7-O-aQFA5A4Q","type":"public-key","rawId":"2hc4gwTGlz7+O+aQFA5A4Q==","response":{"clientDataJSON":"eyJ0eXBlIjoid2ViYXV0aG4uY3JlYXRlIiwiY2hhbGxlbmdlIjoiTFIydHhpcHVPeXg2N1cwMVFaRUd5LTFXN0NjWGpUeTRSSmd0UlNVXzdYUSIsIm9yaWdpbiI6Imh0dHBzOi8vd2ViYXV0aC5sb2NhbCJ9","attestationObject":"o2NmbXRkbm9uZWdhdHRTdG10oGhhdXRoRGF0YViUeUxkStrdv+PkYHQfUpl2NFUTVu5S6YQOLIiD2/dTT6VdAAAAAAAAAAAAAAAAAAAAAAAAAAAAENoXOIMExpc+/jvmkBQOQOGlAQIDJiABIVgg3/+3gbwHXPSTGk7VgU2GMR/m+Zndd9z1HtTfC3bz9BciWCAJDtdbqsiSHkBHRxZdjbH19/b5d+d4qNUqTxnH+WtQMA=="}} [2023-06-08 19:54:50][cd6714] ajax_create_response: Credential ID unique check passed [2023-06-08 19:54:50][cd6714] ajax_create_response: Challenge verified [2023-06-08 19:54:50][cd6714] ajax_create_response: Authenticator added [2023-06-08 19:55:12][750667] ajax_auth: Start [2023-06-08 19:55:12][750667] ajax_auth: type => "auth", user => "df" [2023-06-08 19:55:12][750667] ajax_auth: allowedCredentials => [{"type":"public-key","id":"2hc4gwTGlz7-O-aQFA5A4Q"}] [2023-06-08 19:55:12][750667] ajax_auth: user_verification => "false" [2023-06-08 19:55:12][750667] ajax_auth: Challenge sent [2023-06-08 19:55:15][c014d2] ajax_auth_response: Client response received [2023-06-08 19:55:15][c014d2] ajax_auth_response: type => "auth", user => "df" [2023-06-08 19:55:15][c014d2] ajax_auth_response: data => {"id":"2hc4gwTGlz7-O-aQFA5A4Q","type":"public-key","rawId":"2hc4gwTGlz7+O+aQFA5A4Q==","response":{"authenticatorData":"eUxkStrdv+PkYHQfUpl2NFUTVu5S6YQOLIiD2/dTT6UdAAAAAA==","clientDataJSON":"eyJ0eXBlIjoid2ViYXV0aG4uZ2V0IiwiY2hhbGxlbmdlIjoiRGZKdER5RjRDcU1GVHRXdDRKcFp0YkhWaWJoeGotYVJ2cWNaQ0ZvemRkWSIsIm9yaWdpbiI6Imh0dHBzOi8vd2ViYXV0aC5sb2NhbCJ9","signature":"MEYCIQCUG4AFLwwbDtdeIkf48I5irtbTNkUfUbZnQHjaWI5EEwIhAMTAdUivxyaKv/8mqWiLWHi4ZmomWKdH/DgoUfsTgjGv","userHandle":"YjNhNGUyNmM2ODA3NGNmYmIzYmZiMTAyYmVhY2VkYTU2NjcxMDVhNWZkY2MxMzExOTE3ZDY5OWQyNzM4ZjlkZQ=="}} [2023-06-08 19:55:15][c014d2] ajax_auth_response: Challenge verified [2023-06-08 19:55:15][c014d2] ajax_auth_response: Log in user => "df" [2023-06-08 19:56:14][ff5aae] ajax_auth: Start [2023-06-08 19:56:14][ff5aae] ajax_auth: type => "test", user => "df", usernameless => "false" [2023-06-08 19:56:14][ff5aae] ajax_auth: allowedCredentials => [{"type":"public-key","id":"2hc4gwTGlz7-O-aQFA5A4Q"}] [2023-06-08 19:56:14][ff5aae] ajax_auth: user_verification => "false" [2023-06-08 19:56:14][ff5aae] ajax_auth: Challenge sent [2023-06-08 19:56:16][72fca2] ajax_auth_response: Client response received [2023-06-08 19:56:16][72fca2] ajax_auth_response: type => "test", user => "df" [2023-06-08 19:56:16][72fca2] ajax_auth_response: data => {"id":"2hc4gwTGlz7-O-aQFA5A4Q","type":"public-key","rawId":"2hc4gwTGlz7+O+aQFA5A4Q==","response":{"authenticatorData":"eUxkStrdv+PkYHQfUpl2NFUTVu5S6YQOLIiD2/dTT6UdAAAAAA==","clientDataJSON":"eyJ0eXBlIjoid2ViYXV0aG4uZ2V0IiwiY2hhbGxlbmdlIjoiNXVWSGxFQURvc1kzNkdQRDVIZDR6QTV3Ni0xRzRWazdxU3NUYUNRbm4ySSIsIm9yaWdpbiI6Imh0dHBzOi8vd2ViYXV0aC5sb2NhbCJ9","signature":"MEUCIQCL1J3LtM+Heu9o6Z5FoMNmAr3b2QD/LE3QVNDFwCLESQIgEn9lylnTsZ0jiO7R/kAX3TV06PySvcdH+0pYR4cMuwE=","userHandle":"YjNhNGUyNmM2ODA3NGNmYmIzYmZiMTAyYmVhY2VkYTU2NjcxMDVhNWZkY2MxMzExOTE3ZDY5OWQyNzM4ZjlkZQ=="}} [2023-06-08 19:56:16][72fca2] ajax_auth_response: Challenge verified

yrccondor commented 1 year ago

The need for gmp is introduced by a third party library. We are working on updating the library right now so we'll definitely check this.

wildcs commented 1 year ago

Hi, is there something new? On my hosting there's no gmp installed too. But bcmath and mbstring are both installed.

yrccondor commented 1 year ago

hi Christian I'm currently working on my own project so there may be some delay - sorry. nothing new for now but I'll keep you updated once I can confirm anything about gmp

wildcs commented 1 year ago

yeah i know that problem when working on other projects :) would be very nice if you can confirm this sometime

My1 commented 12 months ago

I would love this too, as some hosters (e.g. Strato) dont have it