fix(files_sharing): fallback self.crypto.getRandomValues#53635
fix(files_sharing): fallback self.crypto.getRandomValues#53635
Conversation
| * @param {Uint8Array} array - The array to fill with random values. | ||
| */ | ||
| function getRandomValues(array: Uint8Array): void { | ||
| if (self?.crypto?.getRandomValues) { |
There was a problem hiding this comment.
| if (self?.crypto?.getRandomValues) { | |
| if (self.crypto?.getRandomValues) { |
There was a problem hiding this comment.
Eehehe I thought self could also be undefined sometimes 🤭🤭
I guess we're adamant this is the browser anyway so yeah, maybe not needed 😊
There was a problem hiding this comment.
If you expect self to be undefined, then just use globalThis instead ;)
HTTP is not the only source, IIRC we use Nevertheless as long as we support non-https for users we should also fix this here. |
It failed on viewer cypress tests. I guess it's because of the docker IP ?🤔 |
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
04c9868 to
3cff9d8
Compare
|
/compile |
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
|
/backport to stable31 |
|
/backport to stable30 |
On tests, we have a non-secure env (HTTP), some users might also use without ssl on their local instances