Intercept the WSL OpenBao browser launch.
OpenBao opens the login with cmd.exe /c start, so the xdg-open launcher never ran. The attended PATH now supplies cmd.exe for that one allowlisted URL and opens it in the empty Playwright Chromium profile. Assistant: grok Assistant-Session: 01a198fa-fd27-7e41-a0a2-57355c3e4efd
This commit is contained in:
parent
2aab7f6f2b
commit
8d4d285643
4 changed files with 69 additions and 13 deletions
|
|
@ -40,3 +40,9 @@ class BrowserBoundary(unittest.TestCase):
|
|||
binary.chmod(0o755)
|
||||
self.assertEqual(launcher['chromium_executable'](spec, root), str(binary))
|
||||
self.assertEqual(launcher['chromium_executable'](root/'missing.json', root), '')
|
||||
def test_wsl_cmd_start_is_the_login_opener(self):
|
||||
url='https://kc.coulomb.social/authorize?'+urlencode({'redirect_uri':'http://127.0.0.1:8250/oidc/callback','state':'test'})
|
||||
escaped=url.replace('&','^&')
|
||||
self.assertEqual(launcher['classify_cmd'](['/c','start',escaped]), ('open', url))
|
||||
self.assertEqual(launcher['classify_cmd'](['/c','start','https://evil.example/']), ('reject', ''))
|
||||
self.assertEqual(launcher['classify_cmd'](['/c','dir']), ('delegate', ''))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue