mirror of
https://github.com/suitenumerique/meet.git
synced 2026-08-19 06:46:37 +00:00
🩹(all) clear the SonarCloud reliability finding and the lint debt
The SonarCloud gate fails on main, so every commit lands red, and gh run list hides it: it lists only Actions workflows, and the failure is an app check run. Reliability rests on one bug, in test_file_service.py, which wrapped an assertion in an except Exception re-raised through pytest.fail. Removing it takes the rating from D to A. Two pieces of debt ride along. The SDK callback id now comes from crypto.getRandomValues, since it guards an endpoint with no auth. And core/tasks gets the __init__.py that lets pylint see it, with the debt that exposes, which is why #1533 fails lint-back.
This commit is contained in:
@@ -2,9 +2,12 @@ export class CallbackIdHandler {
|
||||
private readonly storageKey = 'popup_callback_id'
|
||||
|
||||
private generateId(): string {
|
||||
return (
|
||||
Math.random().toString(36).substring(2, 15) +
|
||||
Math.random().toString(36).substring(2, 15)
|
||||
// The id is the only thing guarding /rooms/creation-callback/, which is
|
||||
// unauthenticated, so it comes from the CSPRNG rather than Math.random.
|
||||
const bytes = new Uint8Array(16)
|
||||
crypto.getRandomValues(bytes)
|
||||
return Array.from(bytes, (byte) => byte.toString(16).padStart(2, '0')).join(
|
||||
''
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user