Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sanitize song bytes #262

Open
AntonioMrtz opened this issue Oct 16, 2024 · 7 comments
Open

Sanitize song bytes #262

AntonioMrtz opened this issue Oct 16, 2024 · 7 comments
Assignees
Labels
backend Backend related issues good first issue Good for newcomers hacktoberfest hacktoberfest help-wanted Help is wanted python Pull requests that update Python code

Comments

@AntonioMrtz
Copy link
Owner

Description

Sanitize song bytes uploaded by the user in create_song service method located at serverless and blob folders (supported architectures)

Context

Uploaded songs by the user can be dangerous due to cross-site scripting and other security risks

How to do it

  • Implement sanitize_audio method in audio_utils
  • Call sanitize_audio from blob and serverless song service create_song

Testing

  • Add unit tests for sanitize_audio method
  • Add integration tests for create_song endpoint request
@AntonioMrtz AntonioMrtz added good first issue Good for newcomers backend Backend related issues help-wanted Help is wanted python Pull requests that update Python code hacktoberfest hacktoberfest labels Oct 16, 2024
@AntonioMrtz
Copy link
Owner Author

@AntonioMrtz AntonioMrtz pinned this issue Oct 16, 2024
@kanishk128
Copy link

Hey @AntonioMrtz would love to work on this, please assign

@AntonioMrtz
Copy link
Owner Author

AntonioMrtz commented Oct 17, 2024

Hi @kanishk128 , all yours. Let me know if you need anything :)

There's also the project docs if you need extra help on common tasks such as set up and configuration. Consider starring the project if you like it :)

@kanishk128
Copy link

kanishk128 commented Oct 17, 2024

Thanks @AntonioMrtz ! I just wanted to confirm a few things:

  • sanitize_audio should be implemented in:
    SpotifyElectron/Backend/app/spotify_electron/utils/audio_management/audio_management_utils.py

  • It will be called by the create_song method located in:
    SpotifyElectron/Backend/app/spotify_electron/song/serverless/song_service.py

    and in:
    SpotifyElectron/Backend/app/spotify_electron/song/blob/song_service.py

Is that correct?

@AntonioMrtz
Copy link
Owner Author

Thanks @AntonioMrtz ! I just wanted to confirm a few things:

* `sanitize_audio` should be implemented in:
  `SpotifyElectron/Backend/app/spotify_electron/utils/audio_management/audio_management_utils.py`

* It will be called by the `create_song` method located in:
  `SpotifyElectron/Backend/app/spotify_electron/song/serverless/song_service.py`
  and in:
  `SpotifyElectron/Backend/app/spotify_electron/song/blob/song_service.py`

Is that correct?

Yes @kanishk128 , you're correct 🎯

@AntonioMrtz AntonioMrtz unpinned this issue Oct 17, 2024
@AntonioMrtz
Copy link
Owner Author

Hi @kanishk128 are you still working in this issue :) ? If you need help with something just let me know 🖐️

@kanishk128
Copy link

Hi @AntonioMrtz yes I am, wrote the sanitize_audio function, will do the tests and create a pull request soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Backend related issues good first issue Good for newcomers hacktoberfest hacktoberfest help-wanted Help is wanted python Pull requests that update Python code
Projects
None yet
Development

No branches or pull requests

2 participants