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

fix(system-server): sanitize the filename in the upload_splash endpoint for OEM Mode. #15063

Merged
merged 2 commits into from
May 1, 2024

Conversation

vegano1
Copy link
Contributor

@vegano1 vegano1 commented May 1, 2024

Overview

Bash does not like spaces or weird characters when loading the custom logo in OEM Mode, so let's sanitize the filename by removing all non-alphanumeric characters.

Fixes: RQA-2668

Test Plan

  • Make sure that all non-alphanumeric characters are stripped from the filename
  • Make sure that the image from the bug ticket Userspace - Pfizer (max width).png displays correctly on bootup.

Changelog

  • replace all non-alphanumeric characters except for period with underscore (_) when processing the image filename

Review requests

Risk assessment

Low

@vegano1 vegano1 requested a review from a team as a code owner May 1, 2024 17:13
@vegano1 vegano1 requested review from brenthagen and CaseyBatten May 1, 2024 17:13
Copy link
Member

@sfoster1 sfoster1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just might be worth setting the extension explicitly

set the file extension explicitly
@vegano1 vegano1 merged commit 78ac8fc into edge May 1, 2024
6 checks passed
@vegano1 vegano1 deleted the oem-mode-sanatize-upload-splash-filename branch May 1, 2024 19:30
Carlos-fernandez pushed a commit that referenced this pull request May 20, 2024
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

Successfully merging this pull request may close these issues.

3 participants