Skip to content

Commit

Permalink
Merge pull request #58 from LibreSign/bugifx/prevent-run-as-with-same…
Browse files Browse the repository at this point in the history
…-user

Prevent use runuser with same user
  • Loading branch information
vitormattos committed Jun 6, 2023
2 parents d98b6fc + c697e4b commit 65761b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/RunServerListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public function start(): void

$cmd = 'php -S ' . self::$host .':' . self::$port . ' -t ' . $script;

if ($this->runAs) {
if ($this->runAs && get_current_user() !== $this->runAs) {
$cmd = 'runuser -u ' . $this->runAs . ' -- ' . $cmd;
}

Expand Down

0 comments on commit 65761b2

Please sign in to comment.