mirror of
https://github.com/PlayCover/PlayCover.git
synced 2026-04-27 00:35:52 +03:00
[PR #430] [MERGED] fix!: Sanitization for IPA path strings #1610
Labels
No labels
UI
app-support
bug
bug
documentation
duplicate
enhancement
game-support
good first issue
help wanted / caution
inactive
invalid
macos-beta
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/PlayCover#1610
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/PlayCover/PlayCover/pull/430
Author: @ohaiibuzzle
Created: 10/19/2022
Status: ✅ Merged
Merged: 10/19/2022
Merged by: @Depal1
Base:
develop← Head:fix/sanitize-strings📝 Commits (1)
5767feafix: Sanitization for IPA path strings📊 Changes
1 file changed (+7 additions, -1 deletions)
View changed files
📝
PlayCover/Utils/URLExtensions.swift(+7 -1)📄 Description
This PR attempts to fix for a potential security issue in PlayCover IPA extraction where it may be vulnerable to shell command injections.
For example: two IPA files could be delivered to an user
valid.ipa<-- Valid ZIP archive (can be hidden, so that zip exits with code 0)valid.ipa;some_command|printf .ipa<-- also a valid IPA fileWhen the second IPA is selected to be install, PlayCover will run
/bin/zsh -c "unzip -oq /path/to/file/valid.ipa;some_command&&printf\ .ipa -d <tempdir>Which:
some_command)Examples:
valid.ipa;as|printf .ipawhich should hang PlayCover indefinitely asaswaits for input-;bluetoothd&&.ipawhich will crash your Mac🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.