[PR #14] [MERGED] Add null check to $privs to catch unelevated runs #7

Closed
opened 2026-03-03 13:56:46 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/KelvinTegelaar/RunAsUser/pull/14
Author: @dbeta
Created: 3/9/2021
Status: Merged
Merged: 3/22/2021
Merged by: @KelvinTegelaar

Base: masterHead: patch-1


📝 Commits (1)

  • cbf9c8b Add null check to $privs to catch unelevated runs

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 Public/Invoke-AsCurrentUser.ps1 (+1 -1)

📄 Description

If RunAsUser is run in an unelevated PowerShell instance, the filtered whoami returns null instead of a disabled state.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/KelvinTegelaar/RunAsUser/pull/14 **Author:** [@dbeta](https://github.com/dbeta) **Created:** 3/9/2021 **Status:** ✅ Merged **Merged:** 3/22/2021 **Merged by:** [@KelvinTegelaar](https://github.com/KelvinTegelaar) **Base:** `master` ← **Head:** `patch-1` --- ### 📝 Commits (1) - [`cbf9c8b`](https://github.com/KelvinTegelaar/RunAsUser/commit/cbf9c8b7504f7672ce05c90377e3720431088f91) Add null check to $privs to catch unelevated runs ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `Public/Invoke-AsCurrentUser.ps1` (+1 -1) </details> ### 📄 Description If RunAsUser is run in an unelevated PowerShell instance, the filtered whoami returns null instead of a disabled state. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-03 13:56:46 +03:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/RunAsUser#7
No description provided.