show unsecure message in myAccount, if shop is not in https
This commit is contained in:
parent
f8a755dc6f
commit
8fccae9412
@ -55,6 +55,7 @@ class Webauthn
|
|||||||
}
|
}
|
||||||
|
|
||||||
$e = oxNew(WebauthnException::class, 'D3_WEBAUTHN_ERR_UNSECURECONNECTION');
|
$e = oxNew(WebauthnException::class, 'D3_WEBAUTHN_ERR_UNSECURECONNECTION');
|
||||||
|
Registry::getLogger()->info($e->getDetailedErrorMessage());
|
||||||
Registry::getUtilsView()->addErrorToDisplay($e);
|
Registry::getUtilsView()->addErrorToDisplay($e);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
@ -26,6 +26,7 @@ class WebauthnErrors
|
|||||||
public const NOTSUPPORTED = 'notsupporederror';
|
public const NOTSUPPORTED = 'notsupporederror';
|
||||||
public const UNKNOWN = 'unknownerror';
|
public const UNKNOWN = 'unknownerror';
|
||||||
public const NOPUBKEYSUPPORT = 'd3nopublickeycredentialsupportederror';
|
public const NOPUBKEYSUPPORT = 'd3nopublickeycredentialsupportederror';
|
||||||
|
public const UNSECURECONNECTION = 'D3_WEBAUTHN_ERR_UNSECURECONNECTION';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param $msg
|
* @param $msg
|
||||||
@ -54,6 +55,11 @@ class WebauthnErrors
|
|||||||
return $lang->translateString('D3_WEBAUTHN_ERR_NOPUBKEYSUPPORT', null, true);
|
return $lang->translateString('D3_WEBAUTHN_ERR_NOPUBKEYSUPPORT', null, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
switch ($msg) {
|
||||||
|
case self::UNSECURECONNECTION:
|
||||||
|
return $lang->translateString($msg);
|
||||||
|
}
|
||||||
|
|
||||||
return $lang->translateString('D3_WEBAUTHN_ERR_TECHNICALERROR', null, true);
|
return $lang->translateString('D3_WEBAUTHN_ERR_TECHNICALERROR', null, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -63,6 +69,10 @@ class WebauthnErrors
|
|||||||
*/
|
*/
|
||||||
public function getErrIdFromMessage(string $msg): string
|
public function getErrIdFromMessage(string $msg): string
|
||||||
{
|
{
|
||||||
return trim(strtolower(substr($msg, 0, strpos($msg, ':'))));
|
if (is_int(strpos($msg, ':'))) {
|
||||||
|
return trim( strtolower( substr( $msg, 0, strpos( $msg, ':' ) ) ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
return trim(strtolower($msg));
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user