EsupPortail / Esup-Pod

plateforme de gestion de fichier vidéo
https://pod.esup-portail.org/
GNU Lesser General Public License v3.0
35 stars 75 forks source link

[WIP] Fix “Error during template rendering“ on playlist when autoplay is active #1142

Closed gcondess closed 3 months ago

gcondess commented 3 months ago

When autoplay is activate on a playlist, at the end of the first video play, an ajax request is done to get the next video data. This request call the playlist_player template wich contains a error in the use of the templatetags method “can_see_playlist_video“ : This method need 2 arguments that must be repectivlely type of a video class and type of playlist class. But the second argument send by the playlist_player template is a type of str class... So this second argument must be replace by a variable of playlist class.

gitguardian[bot] commented 3 months ago

⚠️ GitGuardian has uncovered 4 secrets following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secrets in your pull request
| GitGuardian id | GitGuardian status | Secret | Commit | Filename | | | -------------- | ------------------ | ------------------------------ | ---------------- | --------------- | -------------------- | | [5671469](https://dashboard.gitguardian.com/workspace/350852/incidents/5671469) | Triggered | Generic High Entropy Secret | 2d0be03d3464da131b290df55cf58a02f416bc94 | pod/authentication/tests/test_populated.py | [View secret](https://github.com/EsupPortail/Esup-Pod/commit/2d0be03d3464da131b290df55cf58a02f416bc94#diff-b0cff65090b67ada80b6de296d732d8710006ef1fccbce0aba8843150d3fdd42L592) | | [5671469](https://dashboard.gitguardian.com/workspace/350852/incidents/5671469) | Triggered | Generic High Entropy Secret | 2d0be03d3464da131b290df55cf58a02f416bc94 | pod/authentication/tests/test_populated.py | [View secret](https://github.com/EsupPortail/Esup-Pod/commit/2d0be03d3464da131b290df55cf58a02f416bc94#diff-b0cff65090b67ada80b6de296d732d8710006ef1fccbce0aba8843150d3fdd42L646) | | [5671469](https://dashboard.gitguardian.com/workspace/350852/incidents/5671469) | Triggered | Generic High Entropy Secret | 2d0be03d3464da131b290df55cf58a02f416bc94 | pod/authentication/tests/test_populated.py | [View secret](https://github.com/EsupPortail/Esup-Pod/commit/2d0be03d3464da131b290df55cf58a02f416bc94#diff-b0cff65090b67ada80b6de296d732d8710006ef1fccbce0aba8843150d3fdd42L615) | | [5671469](https://dashboard.gitguardian.com/workspace/350852/incidents/5671469) | Triggered | Generic High Entropy Secret | 2d0be03d3464da131b290df55cf58a02f416bc94 | pod/authentication/tests/test_populated.py | [View secret](https://github.com/EsupPortail/Esup-Pod/commit/2d0be03d3464da131b290df55cf58a02f416bc94#diff-b0cff65090b67ada80b6de296d732d8710006ef1fccbce0aba8843150d3fdd42L569) |
🛠 Guidelines to remediate hardcoded secrets
1. Understand the implications of revoking this secret by investigating where it is used in your code. 2. Replace and store your secrets safely. [Learn here](https://blog.gitguardian.com/secrets-api-management?utm_source=product&utm_medium=GitHub_checks&utm_campaign=check_run_comment) the best practices. 3. Revoke and [rotate these secrets](https://docs.gitguardian.com/secrets-detection/secrets-detection-engine/detectors/generics/generic_high_entropy_secret#revoke-the-secret?utm_source=product&utm_medium=GitHub_checks&utm_campaign=check_run_comment). 4. If possible, [rewrite git history](https://blog.gitguardian.com/rewriting-git-history-cheatsheet?utm_source=product&utm_medium=GitHub_checks&utm_campaign=check_run_comment). Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data. To avoid such incidents in the future consider - following these [best practices](https://blog.gitguardian.com/secrets-api-management/?utm_source=product&utm_medium=GitHub_checks&utm_campaign=check_run_comment) for managing and storing secrets including API keys and other credentials - install [secret detection on pre-commit](https://docs.gitguardian.com/ggshield-docs/integrations/git-hooks/pre-commit?utm_source=product&utm_medium=GitHub_checks&utm_campaign=check_run_comment) to catch secret before it leaves your machine and ease remediation.

🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.