This commit is contained in:
Roland Gruber 2020-06-03 17:51:21 +02:00
parent 6ade23ce65
commit 5a09f8159f
6 changed files with 12 additions and 12 deletions

View File

@ -14,7 +14,7 @@ September 2020
17.03.2020 7.1
- PHP 7 required
- Webauthn/FIDO2 support for 2-factor-authentication (requires PHP 7.2)
- WebAuthn/FIDO2 support for 2-factor-authentication (requires PHP 7.2)
- IMAP: changed library to support latest TLS versions
- Personal: support display name (hidden by default in server profile)
- Windows users: support allowed workstations, more profile options

View File

@ -526,16 +526,16 @@ class WebauthnProvider extends BaseProvider {
*/
public function addCustomInput(&$row, $userDn) {
if (version_compare(phpversion(), '7.2.0') < 0) {
$row->add(new htmlStatusMessage('ERROR', 'Webauthn requires PHP 7.2.'), 12);
$row->add(new htmlStatusMessage('ERROR', 'WebAuthn requires PHP 7.2.'), 12);
return;
}
if (!extension_loaded('PDO')) {
$row->add(new htmlStatusMessage('ERROR', 'Webauthn requires the PDO extension for PHP.'), 12);
$row->add(new htmlStatusMessage('ERROR', 'WebAuthn requires the PDO extension for PHP.'), 12);
return;
}
$pdoDrivers = \PDO::getAvailableDrivers();
if (!in_array('sqlite', $pdoDrivers)) {
$row->add(new htmlStatusMessage('ERROR', 'Webauthn requires the sqlite PDO driver for PHP.'), 12);
$row->add(new htmlStatusMessage('ERROR', 'WebAuthn requires the sqlite PDO driver for PHP.'), 12);
return;
}
include_once __DIR__ . '/webauthn.inc';
@ -567,7 +567,7 @@ class WebauthnProvider extends BaseProvider {
}
$errorMessageDiv = new htmlDiv('generic-webauthn-error', new htmlOutputText(''));
$errorMessageDiv->addDataAttribute('button', _('Ok'));
$errorMessageDiv->addDataAttribute('title', _('Webauthn failed'));
$errorMessageDiv->addDataAttribute('title', _('WebAuthn failed'));
$row->add($errorMessageDiv, 12);
$row->add(new htmlJavaScript('window.lam.webauthn.start(\'' . $pathPrefix . '\', ' . $selfServiceParam . ');'), 0);
}

View File

@ -43,7 +43,7 @@ class toolWebauthn implements \LAMTool {
* @return string name
*/
function getName() {
return _('Webauthn devices');
return _('WebAuthn devices');
}
/**

View File

@ -512,7 +512,7 @@ printHeaderContents(_("Edit general settings"), '../..');
include_once __DIR__ . '/../../lib/webauthn.inc';
$database = new \LAM\LOGIN\WEBAUTHN\PublicKeyCredentialSourceRepositorySQLite();
if ($database->hasRegisteredCredentials()) {
$row->add(new htmlSubTitle(_('Webauthn devices')), 12);
$row->add(new htmlSubTitle(_('WebAuthn devices')), 12);
$webauthnSearchField = new htmlResponsiveInputField(_('User DN'), 'webauthn_searchTerm', null, '252');
$row->add($webauthnSearchField, 12);
$row->addVerticalSpacer('0.5rem');

View File

@ -1453,7 +1453,7 @@ window.lam.webauthn.run = function(prefix, isSelfService) {
}
})
.fail(function() {
console.log('Webauthn failed');
console.log('WebAuthn failed');
});
}
@ -1602,7 +1602,7 @@ window.lam.webauthn.searchDevices = function(event) {
window.lam.webauthn.addDeviceActionListeners();
})
.fail(function() {
console.log('Webauthn search failed');
console.log('WebAuthn search failed');
});
return false;
}
@ -1721,7 +1721,7 @@ window.lam.webauthn.sendRemoveDeviceRequest = function(element, action, successC
}
})
.fail(function() {
console.log('Webauthn device deletion failed');
console.log('WebAuthn device deletion failed');
});
}
@ -1763,7 +1763,7 @@ window.lam.webauthn.registerOwnDevice = function(event, isSelfService) {
resultDiv.html(jsonData.content);
})
.fail(function() {
console.log('Webauthn device registration failed');
console.log('WebAuthn device registration failed');
});
};
}

View File

@ -343,7 +343,7 @@ class Ajax {
$dn = $_POST['dn'];
$sessionDn = $_SESSION['ldap']->getUserName();
if ($sessionDn !== $dn) {
logNewMessage(LOG_ERR, 'Webauthn delete canceled, DN does not match.');
logNewMessage(LOG_ERR, 'WebAuthn delete canceled, DN does not match.');
die();
}
if ($action === 'delete') {