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

perf(conf/upgit): disallow custom executable path of upgit for security #817

Merged
merged 2 commits into from Apr 7, 2024

Conversation

qwqcode
Copy link
Member

@qwqcode qwqcode commented Apr 7, 2024

BREAKING CHANGE: For UpGit users: Due to security reasons, Artalk no longer allows configuring the executable file path (img_upload.upgit.exec) for upgit. Please add it to system environment variables instead.

…rity

BREAKING CHANGE: For UpGit users: Due to security reasons, Artalk no longer allows specifying the executable file path for UpGit (`img_upload.upgit.exec`). Please add it to the system's environment variables instead.
cmdStrSplitted := strings.Split(execCommand, " ")
execApp := cmdStrSplitted[0]
Copy link
Member Author

Choose a reason for hiding this comment

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

An attacker may modify the configuration file and enter rm -rf /* if Artalk gives high permissions. So remove it!

Copy link

codecov bot commented Apr 7, 2024

Codecov Report

Attention: Patch coverage is 0% with 8 lines in your changes are missing coverage. Please review.

Project coverage is 27.12%. Comparing base (ae5543d) to head (dd23119).
Report is 3 commits behind head on master.

Files Patch % Lines
server/handler/upload.go 0.00% 8 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #817      +/-   ##
==========================================
- Coverage   27.20%   27.12%   -0.09%     
==========================================
  Files         181      181              
  Lines        6972     6972              
==========================================
- Hits         1897     1891       -6     
- Misses       4963     4967       +4     
- Partials      112      114       +2     
Flag Coverage Δ
go 27.12% <0.00%> (-0.09%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@qwqcode qwqcode merged commit 73d8ea9 into master Apr 7, 2024
6 of 8 checks passed
@qwqcode qwqcode deleted the perf/upgit branch April 7, 2024 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant