-
Notifications
You must be signed in to change notification settings - Fork 7
Voice Announcement System (website part) #2
Conversation
Dockerfile
Outdated
| COPY . /srv/www/yogsite | ||
| COPY nginx.conf /etc/nginx/sites-available/ | ||
|
|
||
| RUN apt-get install -y ffmpeg |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like current available version on Debian is ffmpeg v4.1.6 which is currently vulnerable to a RCE vulnerability, see https://www.cvedetails.com/cve/CVE-2021-30123/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How do I improve this situation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There isnt really an ideal solution until latest version of ffmpeg is moved into the stable branch.
You can use the experimental branch, but who knows what issues that might have.
RUN echo "deb http://deb.debian.org/debian experimental main" >> /etc/apt/sources.list
RUN apt-get update
RUN apt-get install -y -t experimental ffmpeg
Or see if theres some alternative / workaround... I couldn't see any listing for a workaround on the CVE though. Maybe you could disable compression?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like there are solutions for converting to ogg format which can run in browser.
https://blog.addpipe.com/using-webaudiorecorder-js-to-record-audio-on-your-website/
https://github.com/higuma/web-audio-recorder-js
https://github.com/kbumsik/opus-media-recorder
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still need to use ffmpeg to verify the duration of the sound clip to make sure the user didn't upload like a long-ass sound clip or something
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright after doing some testing I was able to get the experimental version of ffmpeg to install properly
| @blueprint.route("/voice_announce/<string:id>/upload", methods=["POST"]) | ||
| @flask_csrf_ext.exempt | ||
| def voice_announce_upload(id): | ||
| id = secure_filename(id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome
| "voice_announce_query": id, | ||
| "key": server["comms_key"] | ||
| }) | ||
| print(res["exists"]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dont forget to get rid of these
|
Ash is going to kill me |
This is the website part of my voice announcement system thingy.
Note for alex the catboy enthusiast: environment variable GAME_VOICE_ANNOUNCE_DIR must be set to like a directory that's shared between the game server and this.