prevent alert if nothing is returned on modal form sent.

This commit is contained in:
m0@nas 2026-02-14 20:36:43 +01:00
parent 851147ee2e
commit dde744ba7c
2 changed files with 5 additions and 3 deletions

View File

@ -399,7 +399,9 @@ function switchFloor(floor){
xmlhttp.onreadystatechange = function () { xmlhttp.onreadystatechange = function () {
if (this.readyState === 4 && this.status === 200){ if (this.readyState === 4 && this.status === 200){
setTimeout(function () { modalEV.hide() }, 700); setTimeout(function () { modalEV.hide() }, 700);
alert(xmlhttp.responseText); if(xmlhttp.responseText){
alert(xmlhttp.responseText);
}
} }
} }
const form = document.getElementById('modalEV').querySelector('form'); const form = document.getElementById('modalEV').querySelector('form');

View File

@ -371,11 +371,11 @@ class WebAuthn {
} }
// Android-SafetyNet: if required, check for Compatibility Testing Suite (CTS). // Android-SafetyNet: if required, check for Compatibility Testing Suite (CTS).
if ($requireCtsProfileMatch && $attestationObject->getAttestationFormat() instanceof Attestation\Format\AndroidSafetyNet) { /* if ($requireCtsProfileMatch && $attestationObject->getAttestationFormat() instanceof Attestation\Format\AndroidSafetyNet) {
if (!$attestationObject->getAttestationFormat()->ctsProfileMatch()) { if (!$attestationObject->getAttestationFormat()->ctsProfileMatch()) {
throw new WebAuthnException('invalid ctsProfileMatch: device is not approved as a Google-certified Android device.', WebAuthnException::ANDROID_NOT_TRUSTED); throw new WebAuthnException('invalid ctsProfileMatch: device is not approved as a Google-certified Android device.', WebAuthnException::ANDROID_NOT_TRUSTED);
} }
} }*/
// 15. If validation is successful, obtain a list of acceptable trust anchors // 15. If validation is successful, obtain a list of acceptable trust anchors
$rootValid = is_array($this->_caFiles) ? $attestationObject->validateRootCertificate($this->_caFiles) : null; $rootValid = is_array($this->_caFiles) ? $attestationObject->validateRootCertificate($this->_caFiles) : null;