refactor sonarqube findings
Sonarqube Scanner / Prepare environment (push) Successful in 9s
Sonarqube Scanner / Build and test (push) Successful in 25s
Sonarqube Scanner / SonarQube analysis (push) Successful in 58s
Sonarqube Scanner / Deploy to Server (push) Successful in 6s

This commit is contained in:
Florian Zumpe
2026-10-03 16:55:09 +02:00
parent 0db91660b3
commit 535148639f
3 changed files with 72 additions and 56 deletions
+1 -1
View File
@@ -30,7 +30,7 @@ globalThis.Wegwichtel = globalThis.Wegwichtel || {};
return existing;
}
if (typeof globalThis.crypto?.getRandomValues !== 'function') {
throw new Error(ns.I18n.t("local.error.identity"));
throw new TypeError(ns.I18n.t("local.error.identity"));
}
const bytes = globalThis.crypto.getRandomValues(new Uint8Array(32));
const value = Array.from(bytes, byte => byte.toString(16).padStart(2, '0')).join('');