Topic: WebLables and user rights  (Read 1545 times)

WebLables and user rights
« on: March 09, 2018, 01:34:44 PM »

was_JFX

  • Code Baker
  • Grand Chef
  • *****
  • Date Registered: Dec 2010
  • Posts: 1074
Hi,

if I click a Weblink in a script interface it start chrome with admin rights.
The github link in the about windows is ok and uses standard rights.

Re: WebLables and user rights
« Reply #1 on: March 10, 2018, 01:30:36 PM »

ied206

  • Moderator,
  • Chef
  • *****
  • Location: South Korea
  • Date Registered: Jan 2014
  • Posts: 257
Same API (Process.Start) is used in both methods, so in theory they should not differ.
I will research about how to launch web browser as a standard user privilege.

WebLabel (code)
Code: [Select]
Hyperlink hyperLink = new Hyperlink()
{
    NavigateUri = new Uri(info.URL),
};
hyperLink.Inlines.Add(uiCtrl.Text);
hyperLink.RequestNavigate += (object sender, RequestNavigateEventArgs e) =>
{
    Process.Start(e.Uri.ToString());
};
block.Inlines.Add(hyperLink);


AboutWindow (code)
Code: [Select]
private void Hyperlink_RequestNavigate(object sender, System.Windows.Navigation.RequestNavigateEventArgs e)
{
    Process.Start(e.Uri.AbsoluteUri);
    e.Handled = true;
}

Re: WebLables and user rights
« Reply #2 on: March 11, 2018, 04:26:41 PM »

was_JFX

  • Code Baker
  • Grand Chef
  • *****
  • Date Registered: Dec 2010
  • Posts: 1074
Hi ied206,

your right, about window also launches browser with admin rights.
I must have had already an other chrome instance running that time.

I don't know c# well, but I use 3 Win32 API to launch an app "de-elevated" -

SaferCreateLevel
SaferComputeTokenFromLevel
CreateProcessAsUser

Re: WebLables and user rights
« Reply #3 on: May 20, 2018, 04:45:25 AM »

ied206

  • Moderator,
  • Chef
  • *****
  • Location: South Korea
  • Date Registered: Jan 2014
  • Posts: 257
This problem was fixed in recent nightly build, through the use of UACHelper library.

 

Powered by EzPortal