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

Server crash issue after providing malformed data #9

Open
bedros-p opened this issue Sep 30, 2023 · 0 comments
Open

Server crash issue after providing malformed data #9

bedros-p opened this issue Sep 30, 2023 · 0 comments

Comments

@bedros-p
Copy link

Any field that takes in a data:base64 image is susceptible to crashing the whole server

https://nerimity.com/api/users/
POST body (authorization header required)
What the server expects:
{"avatar":"data:image/png;base64,insert+the+b64+encoded+image+here"}
What breaks the server:
{"avatar":"qwerty"}
If the avatar has a field that is not equal to a base64 encoded image, it crashes the image processing service and restarts
Not limited to avatar - also affects banner, and pretty much any endpoint that accepts images, and then crashes the whole thing

Simplest solution is to only accept b64 format images with a format check in the server, but alternative damage control could be to force the server to ignore errors and only log them through any service, with a custom error handler

@SupertigerDev SupertigerDev transferred this issue from Nerimity/nerimity-web Sep 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant