mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
fix(codebase audit): preserve cleanup without regressions
Fix codebase audit regressions while preserving UI/UX behavior and adding review-driven hardening.
This commit is contained in:
+2
-10
@@ -16,14 +16,6 @@ if (!window.fetch) {
|
||||
console.warn('Fetch API is not available, using polyfill');
|
||||
}
|
||||
|
||||
// For crypto support
|
||||
if (typeof window.crypto === 'undefined') {
|
||||
window.crypto = {};
|
||||
}
|
||||
if (typeof window.crypto.getRandomValues === 'undefined') {
|
||||
window.crypto.getRandomValues = function (array) {
|
||||
for (let i = 0; i < array.length; i++) {
|
||||
array[i] = Math.floor(Math.random() * 256);
|
||||
}
|
||||
};
|
||||
if (typeof window.crypto === 'undefined' || typeof window.crypto.getRandomValues !== 'function') {
|
||||
throw new Error('crypto.getRandomValues is required for secure account and signature operations.');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user